Testing
The fixture and the walkthrough a test drives a definition through the whole environment contract with, through public surfaces only. The headless host it mounts on is under Host.
@internote/canvas-sdk/testingAlso exported here, documented under @internote/canvas-sdk/host: createHeadlessCanvasHost, HeadlessCanvasHost, HeadlessEnvironment, HeadlessHostOptions, HeadlessScene.
#Functions
(): LabelState(): WalkthroughReportCovers the semantic pass, layout, cues firing, !cue.to keyframes, toolbar items resolving, and state surviving scroll-away and continue: — using only public SDK surfaces, on a manual clock. Headless and framework-free: run it from any test runner or script and assert report.failed is empty.
#Constants
canvas.label with a cued caption and !cue.to keyframes, and a second scene that continues it.stringLABEL_SOURCE, compiled and refined: the document the label walkthrough mounts.Captured from the real pipeline: compiled by the @internote/chalk wasm compiler against buildInternoteLibrary() with the label type registered, then run through refineInternoteDocument (which turned the !cue.to chains into keyframe tracks and the anchors into wire shapes). Regenerate it by recompiling the source whenever the language changes shape.
canvas.label environment that exercises the whole environment contract through public SDK surfaces only.EnvironmentDefinitionIt is the reference for how an environment is authored end to end:
- vocabulary validated by the compiler (
caption, with cue anchors); !cue.tokeyframes onemphasis(number) andwindow(interval);- a verb handler and step hook driving session state;
- a declarative toolbar contribution;
- session-tier storage that survives scroll-away and
continue:.
Deliberately trivial on the render side (its surface draws nothing) — the point is the contract, not the pixels. Exported from @internote/canvas-sdk/testing; not registered anywhere by default.
#Interfaces
labelEnvironment: counters the walkthrough asserts on.bumpsnumbercaptionsShownnumberstepsSeennumber[]detailstringnamestringpassedbooleanfailedWalkthroughCheck[]passedWalkthroughCheck[]