diff --git a/package.json b/package.json index 797b4cc6..70e6e8ab 100644 --- a/package.json +++ b/package.json @@ -39,13 +39,13 @@ "test": "npm run lint && npm run jsdoc-generate && npm run coverage && npm run depcheck", "test-azure": "npm run coverage-xunit", "lint": "eslint ./", - "unit": "rimraf test/tmp && cross-env NODE_OPTIONS=\"--loader=esmock --no-warnings\" ava", - "unit-verbose": "rimraf test/tmp && cross-env UI5_LOG_LVL=verbose NODE_OPTIONS=\"--loader=esmock --no-warnings\" ava --verbose --serial", + "unit": "rimraf test/tmp && ava", + "unit-verbose": "rimraf test/tmp && cross-env UI5_LOG_LVL=verbose ava --verbose --serial", "unit-watch": "npm run unit -- --watch", - "unit-xunit": "rimraf test/tmp && NODE_OPTIONS=\"--loader=esmock --no-warnings\" ava --tap | tap-xunit --dontUseCommentsAsTestNames=true > test-results.xml", - "unit-inspect": "cross-env UI5_LOG_LVL=verbose NODE_OPTIONS=\"--loader=esmock --no-warnings\" ava debug --break", - "coverage": "rimraf test/tmp && cross-env NODE_OPTIONS=\"--loader=esmock --loader=@istanbuljs/esm-loader-hook --no-warnings\" nyc ava", - "coverage-xunit": "rimraf test/tmp && cross-env NODE_OPTIONS=\"--loader=esmock --loader=@istanbuljs/esm-loader-hook --no-warnings\" nyc --reporter=text --reporter=text-summary --reporter=cobertura ava --tap | tap-xunit --dontUseCommentsAsTestNames=true > test-results.xml", + "unit-xunit": "rimraf test/tmp && ava --node-arguments=\"--experimental-loader=@istanbuljs/esm-loader-hook\" --tap | tap-xunit --dontUseCommentsAsTestNames=true > test-results.xml", + "unit-inspect": "cross-env UI5_LOG_LVL=verbose ava debug --break", + "coverage": "rimraf test/tmp && nyc ava --node-arguments=\"--experimental-loader=@istanbuljs/esm-loader-hook\"", + "coverage-xunit": "nyc --reporter=text --reporter=text-summary --reporter=cobertura npm run unit-xunit", "jsdoc": "npm run jsdoc-generate && open-cli jsdocs/index.html", "jsdoc-generate": "jsdoc -c ./jsdoc.json -t $(node -p 'path.dirname(require.resolve(\"docdash\"))') ./lib/ || (echo 'Error during JSDoc generation! Check log.' && exit 1)", "jsdoc-watch": "npm run jsdoc && chokidar \"./lib/**/*.js\" -c \"npm run jsdoc-generate\"", @@ -69,6 +69,10 @@ ], "ignoredByWatcher": [ "test/tmp/**" + ], + "nodeArguments": [ + "--loader=esmock", + "--no-warnings" ] }, "nyc": {