forked from ourongxing/newsnow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
32 lines (31 loc) · 786 Bytes
/
vitest.config.ts
File metadata and controls
32 lines (31 loc) · 786 Bytes
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
import { join } from "node:path"
import { defineConfig } from "vitest/config"
import unimport from "unimport/unplugin"
import { projectDir } from "./shared/dir"
export default defineConfig({
test: {
globals: true,
environment: "node",
include: ["server/**/*.test.ts", "shared/**/*.test.ts", "test/**/*.test.ts"],
},
resolve: {
alias: {
"@shared": join(projectDir, "shared"),
"#": join(projectDir, "server"),
},
},
plugins: [
// https://github.com/unjs/nitro/blob/v2/src/core/config/resolvers/imports.ts
unimport.vite({
imports: [],
presets: [
{
package: "h3",
ignore: [/^[A-Z]/, r => r === "use"],
},
],
dirs: ["server/utils", "shared"],
// dts: false,
}),
],
})