ginkgo-fd

command module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 9 Imported by: 0

README

ginkgo-fd

go.mod version CI Release License

Example Screenshot

The ginko-fd command uses Ginkgo under the hood to emulate the style of RSpec "format documentation" output.

Installation

Install Ginkgo if you haven't already:

go install github.com/onsi/ginkgo/v2/ginkgo@latest

Then install ginkgo-fd:

go install github.com/woodie/ginkgo-fd@latest

Or build locally:

go mod tidy
go build -o ginkgo-fd
mv ginkgo-fd ~/go/bin/

Usage

Run as a wrapper around ginkgo, passing any arguments through:

ginkgo-fd
ginkgo-fd ./...
ginkgo-fd -v ./mypackage

Or format an existing report file directly:

ginkgo-fd report.json

Sample output:

GinkgoFd
  run
    with a passing report
      prints the suite name
      indents container hierarchy
      indents leaf nodes
      deduplicates shared hierarchy
      prints the summary
      appends xcbeautify's 'Test Succeeded' / 'Tests Passed' footer
      appends Ginkgo's own 'Ran X of Y Specs' / 'SUCCESS!' footer
    with a failing report
      annotates the failed spec
      prints the failures section
      prints the failed examples list
      prints the summary with failure count
      switches the xcbeautify-style footer to 'Test Failed'
      switches the Ginkgo-style footer to 'FAIL!' and counts the failure
    with a skipping report
      annotates the skipped spec
      prints the summary with skipped count
      folds the skip into the xcbeautify-style footer's skipped count, still 'Test Succeeded'
      excludes the skipped spec from 'Ran X of Y' in the Ginkgo-style footer
    when the report file is missing
      returns an error
  color output
    when not a TTY
      omits ANSI codes from passing leaf nodes
      omits ANSI codes from the summary
    when a TTY
      colors passing leaf nodes green
      colors the passing summary green
      colors failed leaf nodes red
      colors the failing summary red
      colors skipped leaf nodes cyan
  main routing
    when a .json argument is given
      formats the report file directly
    when runGinkgo writes a report
      uses a path outside the project directory

Finished in 0.0086 seconds
27 examples, 0 failures

Test Succeeded
Tests Passed: 0 failed, 0 skipped, 27 total (0.0086 seconds)

Ran 27 of 27 Specs in 0.0086 seconds
SUCCESS! -- 27 Passed | 0 Failed | 0 Pending | 0 Skipped

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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