forked from Azure/azure-sdk-for-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vitest.browser.base.config.ts
46 lines (44 loc) · 1.05 KB
/
vitest.browser.base.config.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
45
46
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { defineConfig } from "vitest/config";
import browserMap from "@azure-tools/vite-plugin-browser-test-map";
export default defineConfig({
define: {
"process.env": process.env,
},
test: {
typecheck: {
enabled: true,
},
testTimeout: 18000,
reporters: ["verbose", "junit"],
outputFile: {
junit: "test-results.browser.xml",
},
browser: {
enabled: true,
headless: true,
name: "chromium",
provider: "playwright",
providerOptions: {
launch: {
args: ["--disable-web-security"],
},
},
},
fakeTimers: {
toFake: ["setTimeout", "Date"],
},
watch: false,
coverage: {
include: ["dist-test/browser/**/*.js"],
exclude: [
"dist-test/browser/**/*./*-browser.mjs",
"dist-test/browser/**/*./*-react-native.mjs",
],
provider: "istanbul",
reporter: ["text", "json", "html"],
reportsDirectory: "coverage-browser",
},
},
});