Skip to content

Commit cd6ee80

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

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

package.json

Lines changed: 7 additions & 5 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,13 +44,14 @@
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\"",
51-
"unit": "yarn unit-core && yarn unit-cli && yarn unit-report && yarn unit-viewer && yarn unit-treemap",
52-
"unit:ci": "NODE_OPTIONS=--max-old-space-size=8192 npm run unit-core -- --ci && npm run unit-cli -- --ci && npm run unit-report -- --ci && npm run unit-viewer -- --ci && npm run unit-treemap -- --ci",
53+
"unit": "yarn unit-core && yarn unit-core-esm && yarn unit-cli && yarn unit-report && yarn unit-viewer && yarn unit-treemap",
54+
"unit:ci": "NODE_OPTIONS=--max-old-space-size=8192 npm run unit-core -- --ci && npm run unit-core-esm -- --ci && npm run unit-cli -- --ci && npm run unit-report -- --ci && npm run unit-viewer -- --ci && npm run unit-treemap -- --ci",
5355
"core-unit": "yarn unit-core",
5456
"cli-unit": "yarn unit-cli",
5557
"viewer-unit": "yarn unit-viewer",

0 commit comments

Comments
 (0)