-
Notifications
You must be signed in to change notification settings - Fork 1
/
vitest.config.ts
25 lines (24 loc) · 978 Bytes
/
vitest.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import tsconfig_paths from 'vite-tsconfig-paths'
import { defineConfig } from 'vitest/config'
import { generateDefine } from './tools/define'
export default defineConfig({
define: generateDefine({ dev: true, test: true, world: false, port: '1000', vitest: true }),
test: {
globals: true,
coverage: {
provider: 'istanbul',
reporter: ['html', 'json', 'lcov'],
include: ['src/lib', 'src/modules'],
exclude: ['src/lib/assets', 'src/lib/bds', 'src/test', '**/*.test.ts', '**/*.spec.ts'],
},
setupFiles: ['src/test/setup.ts'],
alias: {
'@minecraft/server': 'test/__mocks__/minecraft_server.ts',
'@minecraft/server-net': 'test/__mocks__/minecraft_server-net.ts',
'@minecraft/server-ui': 'test/__mocks__/minecraft_server-ui.ts',
'@minecraft/server-gametest': 'test/__mocks__/minecraft_server-gametest.ts',
},
exclude: ['**/*.spec.ts', 'node_modules/**', 'scripts'],
},
plugins: [tsconfig_paths()],
})