forked from calcom/cal.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vitest.workspace.ts
42 lines (40 loc) · 1.26 KB
/
vitest.workspace.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
41
42
import { defineWorkspace } from "vitest/config";
const packagedEmbedTestsOnly = process.argv.includes("--packaged-embed-tests-only");
// defineWorkspace provides a nice type hinting DX
const workspaces = packagedEmbedTestsOnly
? [
{
test: {
include: ["packages/embeds/**/*.{test,spec}.{ts,js}"],
environment: "jsdom",
},
},
]
: [
{
test: {
include: ["packages/**/*.{test,spec}.{ts,js}", "apps/**/*.{test,spec}.{ts,js}"],
// TODO: Ignore the api until tests are fixed
exclude: ["apps/api/**/*", "**/node_modules/**/*", "packages/embeds/**/*"],
setupFiles: ["setupVitest.ts"],
},
},
{
test: {
name: "@calcom/closecom",
include: ["packages/app-store/closecom/**/*.{test,spec}.{ts,js}"],
environment: "jsdom",
setupFiles: ["packages/app-store/closecom/test/globals.ts"],
},
},
{
test: {
globals: true,
name: "ui/components",
include: ["packages/ui/components/**/*.{test,spec}.{ts,js,tsx}"],
environment: "jsdom",
setupFiles: ["packages/ui/components/test-setup.ts"],
},
},
];
export default defineWorkspace(workspaces);