mirror of
https://github.com/esengine/DeepSeek-Reasonix.git
synced 2026-11-07 10:45:59 -10:00
test(surface): read the default catalog as optional under a2ui 0.14
a2ui 0.14 types SurfaceModel.defaultCatalog as possibly undefined. Studio's surface always names its catalog in createSurface, so the catalogue checks still hold; an absent catalog now fails them rather than the type check.
This commit is contained in:
1 parent
14dbabfec2
commit
ba6bf964bb
1 file changed
+5
-4
@@ -26,9 +26,10 @@ it("maps field ids to safe bindings and returns typed values from the library da
|
||||
it("does not expose executable components or library functions through the Studio catalogue", () => {
|
||||
const runtime = createSurfaceRuntime([{ kind: "text", value: '<script>bad</script> {"path":"/secret"}' }]);
|
||||
try {
|
||||
expect(runtime.surface.defaultCatalog.functions.size).toBe(0);
|
||||
expect(runtime.surface.defaultCatalog.components.has("Image")).toBe(false);
|
||||
expect(runtime.surface.defaultCatalog.components.has("Video")).toBe(false);
|
||||
expect(runtime.surface.defaultCatalog.components.has("Modal")).toBe(false);
|
||||
const catalog = runtime.surface.defaultCatalog;
|
||||
expect(catalog?.functions.size).toBe(0);
|
||||
expect(catalog?.components.has("Image")).toBe(false);
|
||||
expect(catalog?.components.has("Video")).toBe(false);
|
||||
expect(catalog?.components.has("Modal")).toBe(false);
|
||||
} finally { runtime.dispose(); }
|
||||
});
|
||||
Reference in new issue
Block a user