testutil

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package testutil holds tui-base's house-rule test helpers: architecture layering (CheckNoImports) and descriptive type naming (CheckDescriptiveStructNames). The render/layout checks moved to github.com/jarvisfriends/snap/rendercheck (tui-base ROADMAP SP-14).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDescriptiveStructNames added in v0.1.11

func CheckDescriptiveStructNames(t *testing.T, patterns ...string)

CheckDescriptiveStructNames verifies that structs are not generically named "Model" or "model".

func CheckNoImports added in v0.1.15

func CheckNoImports(t *testing.T, pkgPattern string, forbidden ...string)

CheckNoImports asserts that no package matched by pkgPattern directly imports a package whose path starts with any of the forbidden prefixes. Use it to enforce architectural layering in a plain unit test, e.g. the theme package must never grow a dependency on the router:

testutil.CheckNoImports(t,
    "github.com/jarvisfriends/tui-base/theme",
    "github.com/jarvisfriends/tui-base/router")

Types

This section is empty.

Jump to

Keyboard shortcuts

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