fix(workshop): streamline import review

This commit is contained in:
Thomas Camlong authored and ajnart committed 2026-08-13 19:51:44 +02:00
1 parent 327e5c15ae
commit 2ba31fd37b
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({