Skip to content

Commit

Permalink
skip it on node 10
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Mar 25, 2024
1 parent 7982e24 commit e548afc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,16 @@ describe('gulp', function() {
});

it('can run against gulpfile.mjs', function (done) {
// Node v10 didn't support `exports` in package.json
if (process.version.startsWith('v10.')) {
this.skip();
}

this.timeout(5000);

var cli = path.join(__dirname, '../bin/gulp.js');
var opts = { cwd: path.join(__dirname, 'fixtures/gulpfiles/mjs' ) };
var node = 'node ';
if (process.version.startsWith('v10.')) {
node += '--experimental-modules '
}
cp.exec(node + cli, opts, function (err, stdout, stderr) {
cp.exec('node ' + cli, opts, function (err, stdout, stderr) {
expect(err).toBeNull();
expect(stdout).toMatch('gulpfile.mjs');
expect(stderr).toEqual('');
Expand Down

0 comments on commit e548afc

Please sign in to comment.