Download src/extensions/canvas-extension-module-loader.test.ts from SaylorTwift/openhands: direct link, hf CLI and curl.
- Browser
- Download file 608 Bytes
-
https://huggingface.co/SaylorTwift/openhands/resolve/main/src/extensions/canvas-extension-module-loader.test.ts
- Command line
-
hf download hf://SaylorTwift/openhands/src/extensions/canvas-extension-module-loader.test.ts
-
curl -L -o canvas-extension-module-loader.test.ts https://huggingface.co/SaylorTwift/openhands/resolve/main/src/extensions/canvas-extension-module-loader.test.ts
608 Bytes
| import { describe, expect, it } from "vitest"; | |
| import { | |
| assertCanvasExtensionModule, | |
| InvalidCanvasExtensionModuleError, | |
| } from "#/extensions/canvas-extension-module-loader"; | |
| describe("assertCanvasExtensionModule", () => { | |
| it("accepts a module namespace with an activate export", () => { | |
| expect(() => | |
| assertCanvasExtensionModule({ activate: () => undefined }), | |
| ).not.toThrow(); | |
| }); | |
| it("rejects modules that do not implement the host lifecycle", () => { | |
| expect(() => assertCanvasExtensionModule({ default: {} })).toThrow( | |
| InvalidCanvasExtensionModuleError, | |
| ); | |
| }); | |
| }); | |