diff --git a/jest.config.json b/jest.config.json index ad53fa77a..3b0e10956 100644 --- a/jest.config.json +++ b/jest.config.json @@ -1,7 +1,7 @@ { "rootDir": ".", "testRegex": "src/.*\\.test\\.ts$", - "modulePathIgnorePatterns": ["language-server"], + "modulePathIgnorePatterns": ["language-server", "__vitest__"], "moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"], "coverageReporters": ["json-summary", "text", "lcov"] } diff --git a/package.json b/package.json index b84bba5d5..83a4e07a4 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,8 @@ "ts-node": "^10.9.1", "tslib": "^2.3.1", "tsx": "^3.8.0", - "typescript": "~4.5.0" + "typescript": "~4.5.0", + "vitest": "^0.32.2" }, "exports": { ".": { @@ -98,8 +99,9 @@ "test": "yarn test:tsc", "test:babel": "jest --coverage", "test:bun": "bun test", - "test:tsc": "jest --config ./ts-jest.config.json", - "test:swc": "jest --config ./swc-jest.config.json", + "test:vitest": "npx vitest --no-isolate", + "test:ts-jest": "npx jest --config ./ts-jest.config.json", + "test:swc": "npx jest --config ./swc-jest.config.json", "test:deno": "cd deno && deno test", "prepublishOnly": "npm run test && npm run build && npm run build:deno", "play": "nodemon -e ts -w . -x tsx playground.ts", diff --git a/swc-jest.config.json b/swc-jest.config.json index 7e2aeec21..516809441 100644 --- a/swc-jest.config.json +++ b/swc-jest.config.json @@ -4,7 +4,7 @@ "^.+\\.(t|j)sx?$": "@swc/jest" }, "testRegex": "src/.*\\.test\\.ts$", - "modulePathIgnorePatterns": ["language-server"], + "modulePathIgnorePatterns": ["language-server", "__vitest__"], "moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"], "coverageReporters": ["json-summary", "text", "lcov"] } diff --git a/ts-jest.config.json b/ts-jest.config.json index 0d8700cfe..8051d1085 100644 --- a/ts-jest.config.json +++ b/ts-jest.config.json @@ -4,7 +4,7 @@ "^.+\\.tsx?$": "ts-jest" }, "testRegex": "src/.*\\.test\\.ts$", - "modulePathIgnorePatterns": ["language-server"], + "modulePathIgnorePatterns": ["language-server", "__vitest__"], "moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"], "coverageReporters": ["json-summary", "text", "lcov"] }