Skip to content

Commit cd591a3

Browse files
committed
misc: workaround node esm segfault
1 parent 7f34321 commit cd591a3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
"smoke": "node lighthouse-cli/test/smokehouse/frontends/smokehouse-bin.js",
3434
"debug": "node --inspect-brk ./lighthouse-cli/index.js",
3535
"start": "yarn build-report --only-standalone && node ./lighthouse-cli/index.js",
36-
"jest": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js",
36+
"jest": "node ./node_modules/jest/bin/jest.js",
37+
"jest-esm": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js",
3738
"test": "yarn diff:sample-json && yarn lint --quiet && yarn unit && yarn type-check",
3839
"test-bundle": "yarn smoke --runner bundle -j=1 --retries=2 --invert-match forms",
3940
"test-clients": "yarn jest \"$PWD/clients/\"",
@@ -43,9 +44,10 @@
4344
"test-legacy-javascript": "bash lighthouse-core/scripts/test-legacy-javascript.sh",
4445
"test-docs": "yarn --cwd docs/recipes/auth && yarn jest docs/recipes/integration-test && yarn --cwd docs/recipes/custom-gatherer-puppeteer test",
4546
"test-proto": "yarn compile-proto && yarn build-proto-roundtrip",
46-
"unit-core": "yarn jest \"lighthouse-core\"",
47+
"unit-core": "yarn jest \"lighthouse-core\" --testPathIgnorePatterns=page-functions",
48+
"unit-core-esm": "yarn jest-esm \"page-functions\"",
4749
"unit-cli": "yarn jest \"lighthouse-cli/\"",
48-
"unit-report": "yarn jest \"report/\"",
50+
"unit-report": "yarn jest-esm \"report/\"",
4951
"unit-treemap": "jest \"lighthouse-treemap/.*-test.js\"",
5052
"unit-viewer": "jest \"lighthouse-viewer/.*-test.js\"",
5153
"unit": "yarn unit-core && yarn unit-cli && yarn unit-report && yarn unit-viewer && yarn unit-treemap",

0 commit comments

Comments
 (0)