forked from calcom/cal.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vitest.workspace.ts
41 lines (39 loc) · 1.22 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
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/**/*"],
},
},
{
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);