forked from Effect-TS/effect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vitest.shared.ts
40 lines (37 loc) · 1.11 KB
/
vitest.shared.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
import * as path from "node:path"
import type { UserConfig } from "vitest/config"
const alias = (pkg: string) => ({
[`@effect/${pkg}/test`]: path.join(__dirname, "packages", pkg, "test"),
[`@effect/${pkg}`]: path.join(__dirname, "packages", pkg, "src")
})
// This is a workaround, see https://github.com/vitest-dev/vitest/issues/4744
const config: UserConfig = {
test: {
fakeTimers: {
toFake: undefined
},
sequence: {
concurrent: true
},
alias: {
// TODO: Should we use `effect/test` instead of `effect-test`?
"effect-test": path.join(__dirname, "packages/effect/test"),
"effect": path.join(__dirname, "packages/effect/src"),
...alias("cli"),
...alias("experimental"),
...alias("opentelemetry"),
...alias("platform"),
...alias("platform-node"),
...alias("platform-node-shared"),
...alias("platform-bun"),
...alias("platform-browser"),
...alias("printer"),
...alias("printer-ansi"),
...alias("rpc"),
...alias("rpc-http"),
...alias("schema"),
...alias("typeclass")
}
}
}
export default config