Skip to content

Commit

Permalink
test: switch to vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
RealShadowNova committed Jun 28, 2023
1 parent 1b81937 commit 0656f06
Show file tree
Hide file tree
Showing 6 changed files with 979 additions and 2,330 deletions.
15 changes: 0 additions & 15 deletions jest.config.mjs

This file was deleted.

12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"docs": "typedoc-json-parser",
"lint": "eslint src tests --ext ts --fix",
"format": "prettier --write {src,tests}/**/*.ts",
"test": "jest",
"test:coverage": "jest --coverage",
"test": "vitest run",
"test:coverage": "yarn test --coverage",
"build": "tsup && tsc -b src",
"update": "yarn upgrade-interactive",
"bump": "cliff-jumper",
Expand All @@ -34,17 +34,15 @@
"@favware/npm-deprecate": "^1.0.7",
"@joshdb/eslint-config": "1.1.0-next.cf1153a.0",
"@joshdb/ts-config": "1.1.0-next.cf1153a.0",
"@types/jest": "^29.5.2",
"@types/node": "^17.0.23",
"@types/rimraf": "^3.0.2",
"@typescript-eslint/eslint-plugin": "^5.59.9",
"@typescript-eslint/parser": "^5.59.9",
"@vitest/coverage-v8": "^0.32.2",
"eslint": "^8.42.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"husky": "^8.0.3",
"jest": "^29.5.0",
"jest-extended": "^3.2.4",
"lint-staged": "^13.2.2",
"pinst": "^3.0.0",
"prettier": "^2.8.8",
Expand All @@ -53,11 +51,11 @@
"rollup": "^2.79.1",
"rollup-plugin-cleaner": "^1.0.0",
"rollup-plugin-typescript2": "^0.34.1",
"ts-jest": "^29.1.0",
"tsup": "^6.7.0",
"typedoc": "^0.24.8",
"typedoc-json-parser": "^8.1.2",
"typescript": "^5.1.3"
"typescript": "^5.1.3",
"vitest": "^0.32.2"
},
"repository": {
"type": "git",
Expand Down
3 changes: 2 additions & 1 deletion tests/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"compilerOptions": {
"rootDir": "./",
"outDir": "./build",
"tsBuildInfoFile": "./build/.tsbuildinfo"
"tsBuildInfoFile": "./build/.tsbuildinfo",
"types": ["vitest/globals"]
},
"include": ["./"],
"references": [{ "path": "../src" }]
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.eslint.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"extends": "./tsconfig.base.json",
"include": ["jest.config.mjs", "tsup.config.ts", "src", "tests"]
"include": ["vitest.config.ts", "tsup.config.ts", "src", "tests"]
}
14 changes: 14 additions & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
globals: true,
coverage: {
reporter: ['text', 'lcov', 'clover'],
exclude: ['**/node_modules/**', '**/dist/**', '**/tests/**']
}
},
esbuild: {
target: 'es2022'
}
});
Loading

0 comments on commit 0656f06

Please sign in to comment.