testutil

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package testutil provides testing utilities for Mush CLI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertGolden

func AssertGolden(t *testing.T, got, goldenFile string)

AssertGolden compares got against a golden file. If the -update flag is set, it writes got to the golden file instead. The golden file path is relative to the testdata directory.

func AssertGoldenBytes

func AssertGoldenBytes(t *testing.T, got []byte, goldenFile string)

AssertGoldenBytes compares got bytes against a golden file.

func GoldenPath

func GoldenPath(filename string) string

GoldenPath returns the full path to a golden file in testdata.

func ReadGolden

func ReadGolden(t *testing.T, goldenFile string) string

ReadGolden reads a golden file and returns its contents. Returns empty string if the file doesn't exist.

Types

This section is empty.

Jump to

Keyboard shortcuts

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