| Safe Haskell | Safe-Inferred |
|---|---|
| Language | GHC2021 |
Plutarch.Test.Golden
Description
Utilities for golden testing
To regenerate golden tests it is enough to remove ./goldens directory and rerun tests
Synopsis
- data GoldenTestTree
- plutarchGolden :: TestName -> FilePath -> [GoldenTestTree] -> TestTree
- goldenGroup :: TestName -> [GoldenTestTree] -> GoldenTestTree
- goldenEval :: TestName -> ClosedTerm a -> GoldenTestTree
- goldenEvalFail :: TestName -> ClosedTerm a -> GoldenTestTree
Documentation
data GoldenTestTree Source #
Opaque type representing tree of golden tests
Since: 1.0.0
Arguments
| :: TestName | |
| -> FilePath | Base file name of golden file path. e.g.
|
| -> [GoldenTestTree] | |
| -> TestTree |
Convert tree of golden tests into standard Tasty TestTree, capturing results produced
by nested golden tests
Since: 1.0.0
goldenGroup :: TestName -> [GoldenTestTree] -> GoldenTestTree Source #
Like testGroup but for golden tests
Goldens in the group will be prefixed by the group name
Since: 1.0.0
goldenEval :: TestName -> ClosedTerm a -> GoldenTestTree Source #
Like testEval but will append to goldens created by enclosing plutarchGolden
Since: 1.0.0
goldenEvalFail :: TestName -> ClosedTerm a -> GoldenTestTree Source #
Like testEvalFail but will append to goldens created by enclosing plutarchGolden
Since: 1.0.0