Skip to content

Commit

Permalink
Fix jest and esm
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Jan 30, 2024
1 parent d595f28 commit 294950c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@ export default {
useESM: true
}
]
},
moduleNameMapper: {
'(.+)\\.js': '$1'
}
};
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@
"test": "yarn jest test/ && yarn lint && yarn schema && yarn jest examples/ && yarn test:runtime",
"test:cover": "yarn jest --collectCoverage test/",
"test:inspect": "node --inspect-brk --experimental-vm-modules ./node_modules/.bin/jest --runInBand test",
"test:runtime": "NODE_OPTIONS=--experimental-vm-modules TZ=America/Los_Angeles npx jest test-runtime/ --config test-runtime/jest-config.json",
"test:runtime": "NODE_OPTIONS=--experimental-vm-modules TZ=America/Los_Angeles npx jest test-runtime/ --config test-runtime/jest.config.js",
"test:runtime:generate": "yarn build:only && del-cli test-runtime/resources && VL_GENERATE_TESTS=true yarn test:runtime",
"watch": "tsc -p tsconfig.build.json -w",
"watch:site": "yarn build:site -w",
"watch:test": "yarn jest --watch test/",
"watch:test:runtime": "NODE_OPTIONS=--experimental-vm-modules TZ=America/Los_Angeles npx jest --watch test-runtime/ --config test-runtime/jest-config.json",
"watch:test:runtime": "NODE_OPTIONS=--experimental-vm-modules TZ=America/Los_Angeles npx jest --watch test-runtime/ --config test-runtime/jest.config.js",
"release": "release-it"
},
"repository": {
Expand Down
5 changes: 0 additions & 5 deletions test-runtime/jest-config.json

This file was deleted.

9 changes: 9 additions & 0 deletions test-runtime/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/** @type {import('jest').Config} */
export default {
globalSetup: './setup.js',
globalTeardown: './teardown.js',
testEnvironment: './puppeteer_environment.js',
moduleNameMapper: {
'(.+)\\.js': '$1'
}
};

0 comments on commit 294950c

Please sign in to comment.