remove unnecessary code and configure correctly

pull/12041/head
Benny Joo 2023-10-24 11:46:57 +01:00
parent 8cd95ac698
commit f511ea4e12
2 changed files with 8 additions and 13 deletions

View File

@ -1,4 +1,3 @@
import { JSDOM } from "jsdom";
import { vi } from "vitest";
import createFetchMock from "vitest-fetch-mock";
@ -6,14 +5,3 @@ const fetchMocker = createFetchMock(vi);
// sets globalThis.fetch and globalThis.fetchMock to our mocked version
fetchMocker.enableMocks();
const jsdom = new JSDOM("<!doctype html><html><body></body></html>", {
url: "http://localhost",
});
global.window = jsdom.window;
global.document = jsdom.window.document;
global.navigator = {
...global.navigator,
userAgent: "node.js",
};

View File

@ -16,7 +16,7 @@ const workspaces = packagedEmbedTestsOnly
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/**/*"],
exclude: ["**/node_modules/**/*", "packages/embeds/**/*", "packages/lib/hooks/**/*"],
setupFiles: ["setupVitest.ts"],
},
},
@ -46,6 +46,13 @@ const workspaces = packagedEmbedTestsOnly
setupFiles: ["packages/app-store/test-setup.ts"],
},
},
{
test: {
name: "@calcom/packages/lib/hooks",
include: ["packages/lib/hooks/**/*.{test,spec}.{ts,js}"],
environment: "jsdom",
},
},
];
export default defineWorkspace(workspaces);