Skip to content

Commit

Permalink
add zero-config support for loading ES modules in Node
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Jan 29, 2019
1 parent 8de7fae commit c72ddc2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion bin/_mocha
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/usr/bin/env node
'use strict';

const esmRequire = require('esm')(module);

/**
* This file remains for backwards compatibility only.
* Don't put stuff in this file.
* @see module:lib/cli
*/

require('../lib/cli').main();
esmRequire('../lib/cli').main();
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@
"debug": "3.2.6",
"diff": "3.5.0",
"escape-string-regexp": "1.0.5",
"esm": "3.1.4",
"findup-sync": "2.0.0",
"glob": "7.1.3",
"growl": "1.10.5",
Expand Down
2 changes: 1 addition & 1 deletion test/integration/options.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ describe('options', function() {
setTimeout(function() {
// kill the child process
mocha.kill('SIGINT');
}, 1000);
}, 1500);
});
});
});
Expand Down

0 comments on commit c72ddc2

Please sign in to comment.