Skip to content

Commit

Permalink
Skip async/await tests on node 6
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Oct 2, 2019
1 parent a77def8 commit b7c7b54
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions packages/babel-core/test/async.js
@@ -1,6 +1,12 @@
import path from "path";
import * as babel from "..";

const nodeGte8 = (...args) => {
// "minNodeVersion": "8.0.0" <-- For Ctrl+F when dropping node 6
const testFn = process.version.slice(0, 3) === "v6." ? it.skip : it;
testFn(...args);
};

describe("asynchronicity", () => {
const base = path.join(__dirname, "fixtures", "async");
let cwd;
Expand All @@ -16,7 +22,7 @@ describe("asynchronicity", () => {

describe("config file", () => {
describe("async function", () => {
it("called synchronously", () => {
nodeGte8("called synchronously", () => {
process.chdir("config-file-async-function");

expect(() =>
Expand All @@ -29,7 +35,7 @@ describe("asynchronicity", () => {
);
});

it("called asynchronously", async () => {
nodeGte8("called asynchronously", async () => {
process.chdir("config-file-async-function");

await expect(
Expand Down Expand Up @@ -72,7 +78,7 @@ describe("asynchronicity", () => {
});

describe("cache.using", () => {
it("called synchronously", () => {
nodeGte8("called synchronously", () => {
process.chdir("config-cache");

expect(() =>
Expand All @@ -85,7 +91,7 @@ describe("asynchronicity", () => {
);
});

it("called asynchronously", async () => {
nodeGte8("called asynchronously", async () => {
process.chdir("config-cache");

await expect(
Expand All @@ -102,7 +108,7 @@ describe("asynchronicity", () => {

describe("plugin", () => {
describe("factory function", () => {
it("called synchronously", () => {
nodeGte8("called synchronously", () => {
process.chdir("plugin");

expect(() =>
Expand All @@ -114,7 +120,7 @@ describe("asynchronicity", () => {
);
});

it("called asynchronously", async () => {
nodeGte8("called asynchronously", async () => {
process.chdir("plugin");

await expect(
Expand All @@ -128,7 +134,7 @@ describe("asynchronicity", () => {
});

describe(".pre", () => {
it("called synchronously", () => {
nodeGte8("called synchronously", () => {
process.chdir("plugin-pre");

expect(() =>
Expand All @@ -140,7 +146,7 @@ describe("asynchronicity", () => {
);
});

it("called asynchronously", async () => {
nodeGte8("called asynchronously", async () => {
process.chdir("plugin-pre");

await expect(
Expand All @@ -154,7 +160,7 @@ describe("asynchronicity", () => {
});

describe(".post", () => {
it("called synchronously", () => {
nodeGte8("called synchronously", () => {
process.chdir("plugin-post");

expect(() =>
Expand All @@ -166,7 +172,7 @@ describe("asynchronicity", () => {
);
});

it("called asynchronously", async () => {
nodeGte8("called asynchronously", async () => {
process.chdir("plugin-post");

await expect(
Expand All @@ -180,7 +186,7 @@ describe("asynchronicity", () => {
});

describe("inherits", () => {
it("called synchronously", () => {
nodeGte8("called synchronously", () => {
process.chdir("plugin-inherits");

expect(() =>
Expand All @@ -192,7 +198,7 @@ describe("asynchronicity", () => {
);
});

it("called asynchronously", async () => {
nodeGte8("called asynchronously", async () => {
process.chdir("plugin-inherits");

await expect(
Expand Down

0 comments on commit b7c7b54

Please sign in to comment.