cal/vitest.workspace.ts
Hariom Balhara a0bf5b4067
test: Smoke Tests for packaged embeds and build improvements (#9169)
* Fix 2 Factor Auth

* Add a sandbox to verify types of embed-react

* Add fault types location

* Fix type location again

* Break types

* Ensure that builds are done again when doing pbublish

* Debug failure in CI

* Make sure unit test files arent used by playwright

* Fix embed-react test description

* Update .github/workflows/e2e-embed-react.yml

Co-authored-by: Omar López <zomars@me.com>

* Remove unnecessary log

---------

Co-authored-by: Alex van Andel <me@alexvanandel.com>
Co-authored-by: Omar López <zomars@me.com>
2023-06-01 20:41:30 +00:00

33 lines
976 B
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: ["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"],
},
},
];
export default defineWorkspace(workspaces);