forked from FuelLabs/fuels-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vitest.browser.config.mts
45 lines (42 loc) · 958 Bytes
/
vitest.browser.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
39
40
41
42
43
44
45
import { nodePolyfills } from "vite-plugin-node-polyfills";
import type { UserConfig } from "vitest/config";
import { mergeConfig, defineProject } from "vitest/config";
import sharedConfig from "./vitest.shared.config.mts";
const config: UserConfig = {
plugins: [
nodePolyfills({
globals: {
process: true,
Buffer: true,
global: true,
},
include: [
"crypto",
"buffer",
"fs",
"events",
"timers/promises",
"util",
"stream",
],
overrides: {
fs: "memfs",
},
}),
],
optimizeDeps: {
exclude: ["fsevents", "path-scurry"],
include: ["events", "timers/promises"],
},
test: {
coverage: {
reportsDirectory: "coverage/environments/browser",
},
browser: {
headless: true,
enabled: true,
name: "chrome",
},
},
};
export default mergeConfig(sharedConfig, defineProject(config));