azure-sdk-for-js/vitest.browser.base.config.ts

47 строки
1.1 KiB
TypeScript

// 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",
},
},
});