2023-05-24 23:35:44 +00:00
|
|
|
import { defineWorkspace } from "vitest/config";
|
|
|
|
|
2023-06-01 20:41:30 +00:00
|
|
|
const packagedEmbedTestsOnly = process.argv.includes("--packaged-embed-tests-only");
|
2023-05-24 23:35:44 +00:00
|
|
|
// defineWorkspace provides a nice type hinting DX
|
2023-06-01 20:41:30 +00:00
|
|
|
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/**/*"],
|
2023-09-06 19:23:53 +00:00
|
|
|
setupFiles: ["setupVitest.ts"],
|
2023-06-01 20:41:30 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: {
|
|
|
|
name: "@calcom/closecom",
|
|
|
|
include: ["packages/app-store/closecom/**/*.{test,spec}.{ts,js}"],
|
|
|
|
environment: "jsdom",
|
|
|
|
setupFiles: ["packages/app-store/closecom/test/globals.ts"],
|
|
|
|
},
|
|
|
|
},
|
2023-07-19 15:22:41 +00:00
|
|
|
{
|
|
|
|
test: {
|
|
|
|
globals: true,
|
|
|
|
name: "ui/components",
|
|
|
|
include: ["packages/ui/components/**/*.{test,spec}.{ts,js,tsx}"],
|
|
|
|
environment: "jsdom",
|
|
|
|
setupFiles: ["packages/ui/components/test-setup.ts"],
|
|
|
|
},
|
|
|
|
},
|
2023-10-05 14:50:26 +00:00
|
|
|
{
|
|
|
|
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"],
|
|
|
|
},
|
|
|
|
},
|
2023-06-01 20:41:30 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
export default defineWorkspace(workspaces);
|