diff --git a/lib/config-util.js b/lib/config-util.js index 8515b85ef..d8b8cf618 100644 --- a/lib/config-util.js +++ b/lib/config-util.js @@ -116,7 +116,7 @@ Config.buildYargs = function (cwd) { global: false }) .option('es-modules', { - default: false, + default: true, type: 'boolean', describe: 'tell the instrumenter to treat files as ES Modules', global: false diff --git a/test/nyc-bin.js b/test/nyc-bin.js index e72170083..6103da369 100644 --- a/test/nyc-bin.js +++ b/test/nyc-bin.js @@ -1035,6 +1035,7 @@ describe('the nyc cli', function () { const args = [ bin, '--cache', 'false', + '--es-modules', 'false', process.execPath, './not-strict.js' ] @@ -1065,7 +1066,6 @@ describe('the nyc cli', function () { const args = [ bin, '--cache', 'false', - '--es-modules', 'true', '--exit-on-error', 'true', process.execPath, './not-strict.js' ]