-
Notifications
You must be signed in to change notification settings - Fork 0
/
vitest.config.base.ts
44 lines (42 loc) · 1.07 KB
/
vitest.config.base.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
import {defineConfig} from 'vitest/config';
import {createFilter} from '@rollup/pluginutils';
import arraybuffer from 'vite-plugin-arraybuffer';
function glsl(include: string[]) {
const filter = createFilter(include);
return {
name: 'glsl',
transform(code, id) {
if (!filter(id)) return;
return {
code: `export default ${JSON.stringify(code)};`
};
}
};
}
export default defineConfig({
test: {
pool: 'threads',
poolOptions: {
threads: {
isolate: false,
useAtomics: true,
singleThread: true
}
},
retry: 2,
testTimeout: 5_000,
browser: {
name: 'chromium',
provider: 'playwright',
enabled: true,
headless: true,
fileParallelism: false,
},
restoreMocks: true,
unstubGlobals: true,
},
plugins: [
glsl(['./src/shaders/*.glsl', './3d-style/shaders/*.glsl']),
arraybuffer(),
],
});