GX Framework

Testing

GX test helpers keep rendering and generated output easy to assert from Go tests. Use them for HTML snapshots, normalized VNodes, compiled source, and mounted behavior.

Helpers

gxtest.RenderRender and fail the test on render errors.
gxtest.VNodeInspect the normalized render tree.
gxtest.RequireProp[T]Read a typed VNode prop.
gxtest.CompileGXCompile source in tests.
gxtest.MountWASMRun browser-backed mount assertions.

Example

html := gxtest.Render(t, Notice(NoticeProps{
  Title: "Ready",
}))

Use this with Generated Go when you want to compare snapshots or compiled roots.