Skip to content

Commit

Permalink
test: update jest config for ESM
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy1339 committed Feb 23, 2024
1 parent 247c064 commit 815352d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"lint:fix": "prettier --write '{src,test,scripts}/**/*' README.md package.json",
"pretest": "npm run -s lint",
"test": "npm run -s test:node && npm run -s test:web",
"test:node": "jest --coverage",
"test:node": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" npx jest --coverage",
"test:web": "npm run test:deno && npm run test:browser",
"pretest:web": "npm run -s build",
"test:deno": "cd test/deno && deno test",
Expand Down Expand Up @@ -42,11 +42,15 @@
"typescript": "^5.0.0"
},
"jest": {
"extensionsToTreatAsEsm": [
".ts"
],
"transform": {
"^.+\\.(ts|tsx)$": [
"ts-jest",
{
"tsconfig": "test/tsconfig.test.json"
"tsconfig": "test/tsconfig.test.json",
"useESM": true
}
]
},
Expand Down

0 comments on commit 815352d

Please sign in to comment.