[EngSys] add VS Code vitest settings for core packages (#31583)
The vtest VS code extension (https://marketplace.visualstudio.com/items?itemName=vitest.explorer) works well for unit tests but not so for other packages because most of them does not run properly without dev-tool. Deleting vitest config files for healthinsights-radiologyinsights-rest because it hasn't been migrated to use vitest yet.
This commit is contained in:
Родитель
dc6da5a3a2
Коммит
ad4d271667
|
@ -192,3 +192,6 @@ sdk/template/template-dpg/src/src
|
|||
# sshkey
|
||||
sdk/**/sshKey
|
||||
sdk/**/sshKey.pub
|
||||
|
||||
# vitest results
|
||||
.vite/vitest/results.json
|
||||
|
|
|
@ -36,5 +36,9 @@
|
|||
"**/*.d.ts": true,
|
||||
"**/test-browser/*": true
|
||||
},
|
||||
"typescript.tsdk": "./sdk/core/core-rest-pipeline/node_modules/typescript/lib"
|
||||
"typescript.tsdk": "./sdk/core/core-rest-pipeline/node_modules/typescript/lib",
|
||||
"vitest.vitestPackagePath": "common/tools/dev-tool/node_modules/vitest/package.json",
|
||||
"vitest.experimentalStaticAstCollect": true,
|
||||
"vitest.configSearchPatternExclude": "{**/node_modules/**,**/.*/**,**/*.d.ts,eng/**,samples/**}",
|
||||
"vitest.nodeEnv": {}
|
||||
}
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import { defineConfig } from "vitest/config";
|
||||
|
||||
export default defineConfig({
|
||||
define: {
|
||||
"process.env": process.env,
|
||||
},
|
||||
test: {
|
||||
reporters: ["basic", "junit"],
|
||||
outputFile: {
|
||||
junit: "test-results.browser.xml",
|
||||
},
|
||||
browser: {
|
||||
enabled: true,
|
||||
headless: true,
|
||||
name: "chromium",
|
||||
provider: "playwright",
|
||||
},
|
||||
fakeTimers: {
|
||||
toFake: ["setTimeout", "Date"],
|
||||
},
|
||||
watch: false,
|
||||
include: ["dist-test/browser/**/*.spec.js"],
|
||||
coverage: {
|
||||
include: ["dist-test/browser/**/*.spec.js"],
|
||||
provider: "istanbul",
|
||||
reporter: ["text", "json", "html"],
|
||||
reportsDirectory: "coverage-browser",
|
||||
},
|
||||
},
|
||||
});
|
|
@ -1,31 +0,0 @@
|
|||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import { defineConfig } from "vitest/config";
|
||||
|
||||
export default defineConfig({
|
||||
test: {
|
||||
reporters: ["basic", "junit"],
|
||||
outputFile: {
|
||||
junit: "test-results.browser.xml",
|
||||
},
|
||||
fakeTimers: {
|
||||
toFake: ["setTimeout", "Date"],
|
||||
},
|
||||
watch: false,
|
||||
include: ["test/**/*.spec.ts"],
|
||||
exclude: ["test/**/browser/*.spec.ts"],
|
||||
coverage: {
|
||||
include: ["src/**/*.ts"],
|
||||
exclude: [
|
||||
"src/**/*-browser.mts",
|
||||
"src/**/*-react-native.mts",
|
||||
"vitest*.config.ts",
|
||||
"samples-dev/**/*.ts",
|
||||
],
|
||||
provider: "istanbul",
|
||||
reporter: ["text", "json", "html"],
|
||||
reportsDirectory: "coverage",
|
||||
},
|
||||
},
|
||||
});
|
|
@ -0,0 +1 @@
|
|||
export default ["sdk/core/*/vitest.config.ts"];
|
Загрузка…
Ссылка в новой задаче