-
-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathvitest.config.mts
More file actions
43 lines (41 loc) · 1.13 KB
/
vitest.config.mts
File metadata and controls
43 lines (41 loc) · 1.13 KB
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
import { createJiti } from 'jiti';
import type TypeGPUPlugin from 'unplugin-typegpu/vite';
import { imagetools } from 'vite-imagetools';
import { defineConfig, type Plugin } from 'vitest/config';
import { preview } from '@vitest/browser-preview';
const jiti = createJiti(import.meta.url);
const typegpu = await jiti.import<typeof TypeGPUPlugin>('unplugin-typegpu/vite', { default: true });
export default defineConfig({
plugins: [typegpu({ include: [/\.m?[jt]sx?/] }), imagetools()] as Plugin[],
server: {
proxy: {
'/TypeGPU': {
// Usually where the TypeGPU dev server is
// hosted.
target: 'http://localhost:4321',
changeOrigin: true,
},
},
},
test: {
projects: [
{
test: {
name: 'browser',
include: ['**/*.{test,spec}.browser.ts'],
browser: {
provider: preview(),
instances: [{ browser: 'chromium' }],
},
},
},
{
test: {
name: 'individual-example-tests',
root: './tests/individual-example-tests',
environment: 'node',
},
},
],
},
});