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.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
import { beforeEach, describe, expect, test, vi } from "vitest";
import { runCli } from "./cli";
import { validateRegistry } from "./validate-registry";
vi.mock("./validate-registry", () => ({
validateRegistry: vi.fn(),
}));
beforeEach(() => {
vi.clearAllMocks();
});
describe("runCli", () => {
test("points story generation to package-local static entrypoints", async () => {
await expect(runCli(["generate-stories"])).rejects.toThrow(
"generate-stories must be run from a package-local static entrypoint"
);
});
test("runs registry validation", async () => {
await runCli(["validate-registry", "custom-registry.json"]);
expect(validateRegistry).toHaveBeenCalledWith("custom-registry.json");
});
});