forked from wevm/wagmi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vitest.workspace.ts
85 lines (83 loc) · 2.04 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import path from 'node:path'
import { defineWorkspace } from 'vitest/config'
const alias = {
'@wagmi/connectors': path.resolve(
__dirname,
'./packages/connectors/src/exports',
),
'@wagmi/core': path.resolve(__dirname, './packages/core/src/exports'),
'@wagmi/test': path.resolve(__dirname, './packages/test/src/exports'),
'@wagmi/vue': path.resolve(__dirname, './packages/vue/src/exports'),
wagmi: path.resolve(__dirname, './packages/react/src/exports'),
}
export default defineWorkspace([
{
test: {
name: '@wagmi/cli',
environment: 'node',
include: ['./packages/cli/src/**/*.test.ts'],
testTimeout: 10_000,
setupFiles: ['./packages/cli/test/setup.ts'],
},
},
{
test: {
name: '@wagmi/connectors',
include: ['./packages/connectors/src/**/*.test.ts'],
environment: 'happy-dom',
},
resolve: { alias },
},
{
test: {
name: '@wagmi/core',
include: ['./packages/core/src/**/*.test.ts'],
environment: 'happy-dom',
testTimeout: 10_000,
setupFiles: ['./packages/core/test/setup.ts'],
},
resolve: { alias },
},
{
test: {
name: 'create-wagmi',
include: ['./packages/create-wagmi/src/**/*.test.ts'],
environment: 'node',
testTimeout: 10_000,
},
},
{
test: {
name: 'wagmi',
include: ['./packages/react/src/**/*.test.ts?(x)'],
environment: 'happy-dom',
testTimeout: 10_000,
setupFiles: ['./packages/react/test/setup.ts'],
},
resolve: { alias },
},
{
test: {
name: '@wagmi/vue',
include: ['./packages/vue/src/**/*.test.ts?(x)'],
environment: 'happy-dom',
testTimeout: 10_000,
setupFiles: ['./packages/vue/test/setup.ts'],
},
resolve: { alias },
},
{
test: {
name: 'react-register',
include: ['./packages/register-tests/react/src/**/*.test.ts'],
},
resolve: { alias },
},
{
test: {
name: '@wagmi/test',
include: ['./packages/test/src/**/*.test.ts'],
},
resolve: { alias },
},
])