Skip to content

Commit 361ec74

Browse files
committed
allow vitest
1 parent ac25bea commit 361ec74

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"@types/node": "^12.20.11",
7474
"@typescript-eslint/eslint-plugin": "^4.22.0",
7575
"@typescript-eslint/parser": "^4.22.0",
76+
"@vitest/ui": "^0.30.1",
7677
"cross-var": "^1.1.0",
7778
"cz-conventional-changelog": "^3.3.0",
7879
"eslint": "^7.25.0",
@@ -86,7 +87,9 @@
8687
"semantic-release": "^19.0.2",
8788
"ts-jest": "^28.0.7",
8889
"ts-node": "^10.2.1",
89-
"typescript": "^4.6.4"
90+
"typescript": "^4.6.4",
91+
"vite": "^4.2.1",
92+
"vitest": "^0.30.1"
9093
},
9194
"release": {
9295
"branches": [

tsconfig.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@
4646
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
4747
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
4848
// "typeRoots": [], /* List of folders to include type definitions from. */
49-
// "types": [], /* Type declaration files to be included in compilation. */
49+
"types": [
50+
"vitest/globals"
51+
],
5052
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
5153
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
5254
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */

vite.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { defineConfig } from "vitest/config";
2+
export default defineConfig({
3+
test: {
4+
globals: true,
5+
include: ["./**/*.spec.ts"],
6+
},
7+
});

0 commit comments

Comments
 (0)