hspec-golden: Golden tests for hspec
Golden tests store the expected output in a separated file. Each time a golden test is executed the output of the subject under test (SUT) is compared with the expected output. If the output of the SUT changes then the test will fail until the expected output is updated.
hspec-golden
allows you to write golden tests using the popular hspec
.
describe "myFunc" $ it "generates the right output with the right params" $ let output = show $ myFunc params in defaultGolden "myFunc" output
Please see the README on GitHub for more information.
[Skip to Readme]
Downloads
- hspec-golden-0.2.2.0.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
Versions [RSS] | 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.2.0.0, 0.2.0.1, 0.2.1.0, 0.2.2.0 |
---|---|
Change log | ChangeLog.md |
Dependencies | ansi-terminal (>=1.0 && <2.0), base (>=4.6 && <5), directory (>=1.3.6 && <1.4), filepath (>=1.0 && <2.0), hspec-core (>=2.10 && <3.0), hspec-golden, optparse-applicative (>=0.18.1 && <0.20) [details] |
Tested with | ghc ==8.8, ghc ==8.10, ghc ==9.0 |
License | MIT |
Copyright | 2019-Present Stack Builders Inc |
Author | Stack Builders |
Maintainer | Cristhian Motoche <cmotoche@stackbuilders.com> |
Revised | Revision 1 made by jack at 2025-09-18T00:24:39Z |
Category | Testing |
Home page | https://github.com/stackbuilders/hspec-golden#readme |
Bug tracker | https://github.com/stackbuilders/hspec-golden/issues |
Source repo | head: git clone https://github.com/stackbuilders/hspec-golden |
Uploaded | by camm at 2024-04-12T21:36:30Z |
Distributions | Arch:0.2.2.0, LTSHaskell:0.2.2.0, NixOS:0.2.2.0, Stackage:0.2.2.0 |
Reverse Dependencies | 1 direct, 0 indirect [details] |
Executables | hgold |
Downloads | 5262 total (30 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs available [build log] Last success reported on 2024-04-12 [all 1 reports] |