Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

fix: tests

Andras Bacsai01d1d9451e29
diff --git a/packages/http-client/src/index.test.ts b/packages/http-client/src/index.test.ts
index 0381dd59ea..9428e2e13c 100644
--- a/packages/http-client/src/index.test.ts
+++ b/packages/http-client/src/index.test.ts
@@ -2,21 +2,27 @@ import { loadProject } from "./index";
const existingProject = "ab3619d3-831f-46f8-abb6-609558cffd99";
const notPublishedProject = "7ec397c6-b3d0-4967-9073-9d83623fcf8e";
+const webstudioAPIUrl = "http://localhost:3000";
const nonExistingProject = "1";
describe("getProjectDetails", () => {
test("loads existing project", async () => {
- const response = await loadProject({ projectId: existingProject });
+ const response = await loadProject({
+ webstudioAPIUrl,
+ projectId: existingProject,
+ });
expect(response.tree.id).toBeTruthy();
});
test("loads non-existing project", async () => {
const response = await loadProject({
+ webstudioAPIUrl,
projectId: nonExistingProject,
});
expect(response.tree.errors).toBe("Project required");
});
test("loads not published project", async () => {
const response = await loadProject({
+ webstudioAPIUrl,
projectId: notPublishedProject,
});
expect(response.tree.errors).toBe(