Shell not built. Run: bun run --cwd packages/plugins/dynamic-ui build:shell
"; + return shellHtmlCache; +}; diff --git a/packages/plugins/dynamic-ui/src/shell/component-runtime.test.ts b/packages/plugins/dynamic-ui/src/shell/component-runtime.test.ts new file mode 100644 index 000000000..56c96fc58 --- /dev/null +++ b/packages/plugins/dynamic-ui/src/shell/component-runtime.test.ts @@ -0,0 +1,53 @@ +import { describe, expect, it } from "@effect/vitest"; + +import { compileJsx, evaluateComponent } from "./component-runtime"; + +describe("generated UI component runtime", () => { + it("accepts export default function components", () => { + const compiled = compileJsx(` + const config = { maxHeight: 500 }; + + export default function App() { + return{this.state.error.stack}
+ )}
+ {blockedMessages.join("\\n")}
+ {escapeResults.join("\\n")}
+
+ {data ? JSON.stringify(data, null, 2) : (text ?? "(no result)")}
+
+ )}
+ {this.state.error.stack}
+ )}
+