-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvitest.config.ts
More file actions
42 lines (41 loc) · 1.74 KB
/
Copy pathvitest.config.ts
File metadata and controls
42 lines (41 loc) · 1.74 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
import { defineConfig } from "vitest/config"
import { resolve } from "node:path"
export default defineConfig({
test: {
globals: true,
include: ["tests/**/*.test.ts", "packages/*/src/**/*.test.ts"],
coverage: {
provider: "v8",
include: ["packages/*/src/**/*.ts"],
exclude: [
"packages/*/src/**/*.d.ts",
"packages/python2ts/src/cli/**", // Integration-tested via execSync
"packages/pythonlib/src/*.browser.ts" // Browser stubs, can't be tested in Node.js
],
thresholds: {
lines: 80,
functions: 80,
branches: 70,
statements: 80
},
reporter: ["text", "html", "lcov"]
}
},
resolve: {
alias: {
pythonlib: resolve(__dirname, "packages/pythonlib/src/index.ts"),
"pythonlib/random": resolve(__dirname, "packages/pythonlib/src/random.ts"),
"pythonlib/math": resolve(__dirname, "packages/pythonlib/src/math.ts"),
"pythonlib/datetime": resolve(__dirname, "packages/pythonlib/src/datetime.ts"),
"pythonlib/json": resolve(__dirname, "packages/pythonlib/src/json.ts"),
"pythonlib/re": resolve(__dirname, "packages/pythonlib/src/re.ts"),
"pythonlib/functools": resolve(__dirname, "packages/pythonlib/src/functools.ts"),
"pythonlib/os": resolve(__dirname, "packages/pythonlib/src/os.node.ts"),
"pythonlib/itertools": resolve(__dirname, "packages/pythonlib/src/itertools.ts"),
"pythonlib/collections": resolve(__dirname, "packages/pythonlib/src/collections.ts"),
"pythonlib/string": resolve(__dirname, "packages/pythonlib/src/string.ts"),
"pythonlib/hashlib": resolve(__dirname, "packages/pythonlib/src/hashlib.ts"),
python2ts: resolve(__dirname, "packages/python2ts/src/index.ts")
}
}
})