Skip to content

Commit

Permalink
Fix mochify setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mantoni committed Aug 26, 2024
1 parent 80d0951 commit 6bbd859
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand 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"
},
Expand Down
4 changes: 3 additions & 1 deletion test/issues/issues-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
});
Expand Down

0 comments on commit 6bbd859

Please sign in to comment.