uisnapshot

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package uisnapshot supports rendered UI regression fixtures in tests. It is not used by production renderers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(t testing.TB, path, rendered string)

Assert compares rendered output with a reviewed fixture, stripping only ANSI sequences. A mismatch writes path + ".new" without replacing the fixture. MEKUGI_UPDATE_UI_SNAPSHOTS=1 explicitly replaces fixtures instead.

func AssertTerminal added in v0.2.0

func AssertTerminal(t testing.TB, path string, rows []string, width int)

AssertTerminal compares terminal cells, including styles and links, with a reviewed fixture. Rows come from the actual renderer, not a snapshot renderer. Canonical ANSI output is quoted so equivalent escape sequences compare equal and fixture diffs cannot execute terminal controls. A following plain row can expose styles that leak out of the rendered content.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL