forked from vueuse/vueuse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvitest.workspace.ts
56 lines (55 loc) · 1.18 KB
/
vitest.workspace.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import { resolve } from 'node:path'
import { defineWorkspace } from 'vitest/config'
export default defineWorkspace([
// If you want to keep running your existing tests in Node.js, uncomment the next line.
// 'vitest.config.ts',
{
extends: 'vitest.config.ts',
test: {
include: [
'packages/**/*.browser.{test,spec}.ts',
],
name: 'browser',
setupFiles: ['vitest-browser-vue'],
browser: {
enabled: true,
name: 'chromium',
provider: 'playwright',
headless: true,
// https://playwright.dev
providerOptions: {
},
},
},
resolve: {
alias: {
vue: 'vue/dist/vue.esm-bundler.js',
},
},
},
{
extends: 'vitest.config.ts',
test: {
name: 'unit',
environment: 'jsdom',
include: [
'!packages/**/*.browser.{test,spec}.ts',
'packages/**/*.{test,spec}.ts',
],
setupFiles: [resolve(__dirname, 'packages/.test/setup.ts')],
server: {
deps: {
inline: [
'vue',
'msw',
],
},
},
},
ssr: {
noExternal: [
/@vueuse\/.*/,
],
},
},
])