60 lines
1.8 KiB
TypeScript
60 lines
1.8 KiB
TypeScript
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: ["**/node_modules/**/*", "packages/embeds/**/*", "packages/lib/hooks/**/*"],
|
|
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"],
|
|
},
|
|
},
|
|
{
|
|
test: {
|
|
globals: true,
|
|
name: "EventTypeAppCardInterface components",
|
|
include: ["packages/app-store/_components/**/*.{test,spec}.{ts,js,tsx}"],
|
|
environment: "jsdom",
|
|
setupFiles: ["packages/app-store/test-setup.ts"],
|
|
},
|
|
},
|
|
{
|
|
test: {
|
|
name: "@calcom/packages/lib/hooks",
|
|
include: ["packages/lib/hooks/**/*.{test,spec}.{ts,js}"],
|
|
environment: "jsdom",
|
|
setupFiles: [],
|
|
},
|
|
},
|
|
];
|
|
|
|
export default defineWorkspace(workspaces);
|