Skip to content

Commit b5b5486

Browse files
committed
isolate test cases
1 parent b13e160 commit b5b5486

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

jest.config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@ const config: Config = {
55
extensionsToTreatAsEsm: [".ts"],
66
verbose: true,
77
moduleFileExtensions: ["js", "json", "ts"],
8-
testRegex: ".*\\.spec\\.ts$",
8+
testMatch: ["**/test/**/*.spec.ts", "!**/test/build-output.spec.ts"],
99
transform: {
1010
"^.+\\.ts$": [
1111
"ts-jest",
1212
{
1313
useESM: true,
14+
tsconfig: {
15+
module: "ES2022",
16+
target: "ES2022",
17+
},
1418
},
1519
],
1620
},

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@
3131
},
3232
"scripts": {
3333
"test": "NODE_OPTIONS='--experimental-vm-modules --no-warnings' jest",
34-
"test:build": "npm run build && npm test -- test/build-output.spec.ts && node test/integration/esm-imports.mjs",
34+
"test:build": "npm run build && NODE_OPTIONS='--experimental-vm-modules --no-warnings' jest --testMatch='**/test/build-output.spec.ts' && node test/integration/esm-imports.mjs",
3535
"lint": "eslint src/**/*.ts test/**/*.ts",
3636
"prepare": "husky",
3737
"typecheck": "tsc --noEmit",
3838
"build": "rm -rf *.js *.d.ts *.d.ts.map *.js.map stealth && tsc -p tsconfig.build.json",
39+
"build:clean": "rm -rf *.js *.d.ts *.d.ts.map *.js.map stealth",
3940
"prepublishOnly": "npm run build"
4041
},
4142
"exports": {

0 commit comments

Comments
 (0)