forked from balancer/b-sdk
-
Notifications
You must be signed in to change notification settings - Fork 1
/
vitest.config.mts
38 lines (36 loc) · 1.33 KB
/
vitest.config.mts
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
import { loadEnv } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
import { defineConfig } from 'vitest/config';
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
return {
define: {
'process.env.ETHEREUM_RPC_URL': JSON.stringify(
env.ETHEREUM_RPC_URL,
),
'process.env.POLYGON_RPC_URL': JSON.stringify(env.POLYGON_RPC_URL),
'process.env.ARBITRUM_RPC_URL': JSON.stringify(
env.ARBITRUM_RPC_URL,
),
'process.env.FANTOM_RPC_URL': JSON.stringify(env.FANTOM_RPC_URL),
'process.env.OPTIMISM_RPC_URL': JSON.stringify(
env.OPTIMISM_RPC_URL,
),
'process.env.SKIP_GLOBAL_SETUP': JSON.stringify(
env.SKIP_GLOBAL_SETUP,
),
},
test: {
testTimeout: 20_000,
hookTimeout: 60_000,
setupFiles: ['/test/vitest-setup.ts'],
globals: true,
pool: 'forks',
// Uncomment to debug suite excluding some tests
// exclude: ['test/*weighted*.integration.*', 'node_modules', 'dist'],
// Uncomment to run integration tests sequentially
// threads: false,
},
plugins: [tsconfigPaths()],
};
});