fix(workshop): streamline import review

This commit is contained in:
Thomas Camlong committed 2026-08-10 18:47:23 +02:00
1 parent cf3c4b4152
commit e524515ca5
13 files changed
+234 -59

No files matched your search

+11
View File
@@ -57,6 +57,17 @@ describe("Workshop widget validation", () => {
).toBe(true);
});
test("normalizes widget submissions to readable multi-line JSON", () => {
const parsed = workshopSubmissionInputSchema.parse({
type: "customWidget",
title: "Starter widget",
description: "",
content: JSON.stringify(CUSTOM_WIDGET_STARTER),
});
expect(parsed.content).toContain('\n "$schema":');
expect(JSON.parse(parsed.content)).toEqual(CUSTOM_WIDGET_STARTER);
});
test("accepts Custom CSS without treating it as widget JSON", () => {
expect(
workshopSubmissionInputSchema.safeParse({