diff --git a/package.json b/package.json index 5a028e7ac..82c30637a 100644 --- a/package.json +++ b/package.json @@ -33,10 +33,10 @@ "scripts": { "test-node": "mocha --recursive -R dot \"test/**/*-test.js\"", "test-dev": "npm run test-node -- -n watch -n watch-path=test --node-option watch-path=lib -R min", - "test-headless": "mochify --driver puppeteer --no-detect-globals --recursive -R dot --grep WebWorker --invert \"test/**/*-test.js\"", + "test-headless": "mochify --driver puppeteer", "test-coverage": "nyc npm run test-headless -- --transform [ babelify --ignore [ test ] --plugins [ babel-plugin-istanbul ] ]", "test-cloud": "npm run test-headless -- --wd", - "test-webworker": "mochify --driver puppeteer --no-detect-globals --https-server 0 --no-request-interception test/webworker/webworker-support-assessment.js", + "test-webworker": "mochify --driver puppeteer --serve . test/webworker/webworker-support-assessment.js", "test-esm-support": "mocha test/es2015/module-support-assessment-test.mjs", "test-esm-browser-build": "node test/es2015/check-esm-bundle-is-runnable.js", "test-docker-image": "docker-compose up", @@ -76,7 +76,7 @@ "mochify": { "reporter": "dot", "timeout": 10000, - "bundle": "esbuild --bundle --sourcemap=inline --define:process.env.NODE_DEBUG=\"\"", + "bundle": "esbuild --bundle --sourcemap=inline --define:process.env.NODE_DEBUG=\"\" --external:fs", "bundle_stdin": "require", "spec": "test/**/*-test.js" }, diff --git a/test/issues/issues-test.js b/test/issues/issues-test.js index 8f6239acc..6d17593e7 100644 --- a/test/issues/issues-test.js +++ b/test/issues/issues-test.js @@ -43,7 +43,9 @@ describe("issues", function () { describe("#458", function () { describe("on node", function () { beforeEach(function () { - if (typeof require("fs").readFileSync !== "function") { + try { + require("fs"); + } catch (_) { this.skip(); } });