-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathvitest.browser.config.ts
More file actions
53 lines (52 loc) · 1.45 KB
/
Copy pathvitest.browser.config.ts
File metadata and controls
53 lines (52 loc) · 1.45 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
44
45
46
47
48
49
50
51
52
53
import { configDefaults, defineConfig } from 'vitest/config';
import { playwright } from '@vitest/browser-playwright';
import solid from 'vite-plugin-solid';
export default defineConfig(({ mode }) => ({
define: {
__DEV__: true,
VITE_SOLIDTV_DOM_RENDERING: true,
},
plugins: [
solid({
hot: false,
solid: {
moduleName: '@solidtv/solid',
generate: 'universal',
builtIns: [],
},
}),
],
test: {
exclude: [
...configDefaults.exclude,
// vitest.webgl.config.ts runs these; bench/.arms holds copies of tests.
'tests/webgl/**',
'bench/**',
// Contract tests that pin the DOM renderer of the jsdom run
// (vitest.config.ts defines SOLIDTV_DOM_RENDERING; here Solid renders
// through WebGL, so they fail), and publicApi (node:fs). The other
// contract files pass here.
'tests/contract-lazy.test.tsx',
'tests/contract-nodes.test.tsx',
'tests/contract-row-column.test.tsx',
'tests/contract-states.test.tsx',
'tests/contract-styles.test.tsx',
'tests/contract-text.test.tsx',
'tests/publicApi.test.ts',
],
browser: {
enabled: true,
provider: playwright(),
// https://vitest.dev/guide/browser/playwright
instances: [
{
browser: 'chromium',
headless: false,
},
],
},
},
resolve: {
conditions: ['@solidtv/source', 'browser', 'development'],
},
}));