Skip to content

Commit 6309322

Browse files
committedJun 23, 2023
Update test runners
1 parent 898dced commit 6309322

4 files changed

+8
-6
lines changed
 

‎jest.config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"rootDir": ".",
33
"testRegex": "src/.*\\.test\\.ts$",
4-
"modulePathIgnorePatterns": ["language-server"],
4+
"modulePathIgnorePatterns": ["language-server", "__vitest__"],
55
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"],
66
"coverageReporters": ["json-summary", "text", "lcov"]
77
}

‎package.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@
4141
"ts-node": "^10.9.1",
4242
"tslib": "^2.3.1",
4343
"tsx": "^3.8.0",
44-
"typescript": "~4.5.0"
44+
"typescript": "~4.5.0",
45+
"vitest": "^0.32.2"
4546
},
4647
"exports": {
4748
".": {
@@ -98,8 +99,9 @@
9899
"test": "yarn test:tsc",
99100
"test:babel": "jest --coverage",
100101
"test:bun": "bun test",
101-
"test:tsc": "jest --config ./ts-jest.config.json",
102-
"test:swc": "jest --config ./swc-jest.config.json",
102+
"test:vitest": "npx vitest --no-isolate",
103+
"test:ts-jest": "npx jest --config ./ts-jest.config.json",
104+
"test:swc": "npx jest --config ./swc-jest.config.json",
103105
"test:deno": "cd deno && deno test",
104106
"prepublishOnly": "npm run test && npm run build && npm run build:deno",
105107
"play": "nodemon -e ts -w . -x tsx playground.ts",

‎swc-jest.config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"^.+\\.(t|j)sx?$": "@swc/jest"
55
},
66
"testRegex": "src/.*\\.test\\.ts$",
7-
"modulePathIgnorePatterns": ["language-server"],
7+
"modulePathIgnorePatterns": ["language-server", "__vitest__"],
88
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"],
99
"coverageReporters": ["json-summary", "text", "lcov"]
1010
}

‎ts-jest.config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"^.+\\.tsx?$": "ts-jest"
55
},
66
"testRegex": "src/.*\\.test\\.ts$",
7-
"modulePathIgnorePatterns": ["language-server"],
7+
"modulePathIgnorePatterns": ["language-server", "__vitest__"],
88
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"],
99
"coverageReporters": ["json-summary", "text", "lcov"]
1010
}

0 commit comments

Comments
 (0)
Please sign in to comment.