NAME
prism — Turn raw test output into beautiful data
SYNOPSIS
go install go.dalton.dog/prism@latestINFO
DESCRIPTION
Turn raw test output into beautiful data
README
Welcome to prism!
All I'm saying is that maybe people would be a bit more willing to write unit tests if they were prettier to look at... 💅
Make your unit testing results not only easier on the parse, but downright pleasant to look at! Prism works anywhere go test works, so it can be quickly integrated into any project using Go v1.24 or higher (that's when -json was introduced).

Installation
Homebrew 🍺
- Have
brewinstalled (brew.sh) - Run the following:
brew install --cask daltonsw/tap/prism
Go 🖥️
- Have
Go - Have your
Goinstall location on your$PATH - Run the following:
go install go.dalton.dog/prism@latest
Github Releases 🐙
- Go to the
Releasestab of the repo here - Download the latest archive for your OS/architecture
- Extract it and place the resulting binary on your
$PATHand ensure it is executable
cd ~/Downloads # Assuming you downloaded it here
tar -xvf prism_[whatever].tar.gz # x: Extract; v: Verbose output; f: Specify filename
chmod +x prism # Make file executable
mv prism [somewhere on your $PATH] # Move the file to somewhere on your path for easy execution
Usage
Unit Tests
Just run prism in your module directory. Anywhere you'd run go test, use prism instead. That's it!

-v -- Verbose output. Includes any additional output logged during tests

-f -- Failed Only. Only gives information about tests that failed

--no-color OR --show-color to force showing or hiding color

Anything else will be appended directly to go test -json
Benchmarking
The simplest usage is just prism bench. This will ignore all tests and run all benchmarks in ./...

The first optional argument is a regex string and is appended to the normal -bench= flag for go test. It defaults to .
The second optional argument is the path, if you want to benchmark over something other than ./....
If you want to pass a path, you MUST pass a regex string
Configuration
Running prism config show will show you the currently stored values for configuration
To change your defaults, run prism config set [key] {true|false} with any of the following keys:
fails_onlyverboseno_barno_color(will setshow_colorto the opposite)show_color(will setno_colorto the opposite)