chore(vitest): 🚀 Update test setup for new feature release
This commit is contained in:
parent
ffe6460e35
commit
1a46d7bf54
3 changed files with 38 additions and 0 deletions
14
tooling/vitest/package.json
Normal file
14
tooling/vitest/package.json
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"name": "@imajin/vitest",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"description": "Shared Vitest configurations for @imajin workspace",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
"./base": "./vitest.config.base.ts",
|
||||
"./dom": "./vitest.config.dom.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vitest": "^2.0.0"
|
||||
}
|
||||
}
|
||||
13
tooling/vitest/vitest.config.base.ts
Normal file
13
tooling/vitest/vitest.config.base.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
globals: true,
|
||||
environment: 'node',
|
||||
include: ['src/**/*.test.ts', 'tests/**/*.test.ts'],
|
||||
coverage: {
|
||||
provider: 'v8',
|
||||
reporter: ['text', 'json'],
|
||||
},
|
||||
},
|
||||
});
|
||||
11
tooling/vitest/vitest.config.dom.ts
Normal file
11
tooling/vitest/vitest.config.dom.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { defineConfig, mergeConfig } from 'vitest/config';
|
||||
import baseConfig from './vitest.config.base';
|
||||
|
||||
export default mergeConfig(
|
||||
baseConfig,
|
||||
defineConfig({
|
||||
test: {
|
||||
environment: 'jsdom',
|
||||
},
|
||||
})
|
||||
);
|
||||
Loading…
Add table
Reference in a new issue