Skip to content

Commit

Permalink
Skip --watch tests on Node.js 6
Browse files Browse the repository at this point in the history
There is something weird going on with stdin/out streams.
  • Loading branch information
nicolo-ribaudo committed Dec 21, 2021
1 parent ff92686 commit 2929ca9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
@@ -1,5 +1,6 @@
{
"args": ["src", "--out-dir", "lib", "--watch", "--verbose"],
"noBabelrc": true,
"noDefaultPlugins": true
"noDefaultPlugins": true,
"minNodeVersion": 8
}
@@ -1,5 +1,6 @@
{
"args": ["src", "--out-dir", "lib", "--watch"],
"noBabelrc": true,
"noDefaultPlugins": true
"noDefaultPlugins": true,
"minNodeVersion": 8
}
9 changes: 8 additions & 1 deletion packages/babel-cli/test/index.js
Expand Up @@ -282,8 +282,15 @@ fs.readdirSync(fixtureLoc).forEach(function (binName) {
// copy .babelignore file to tmp directory
opts.inFiles[".babelignore"] = helper.readFile(babelIgnoreLoc);
}

const skip =
opts.minNodeVersion &&
parseInt(process.versions.node, 10) < opts.minNodeVersion;

// eslint-disable-next-line jest/valid-title
it(testName, buildTest(binName, testName, opts), 20000);
(skip
? it.skip
: it)(testName, buildTest(binName, testName, opts), 20000);
});
});
});
Expand Down

0 comments on commit 2929ca9

Please sign in to comment.