| Safe Haskell | None |
|---|---|
| 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 :: forall (a :: S -> Type). TestName -> (forall (s :: S). Term s a) -> GoldenTestTree
- goldenEvalWithConfig :: forall (a :: S -> Type). Config -> TestName -> (forall (s :: S). Term s a) -> GoldenTestTree
- goldenEvalFail :: forall (a :: S -> Type). TestName -> (forall (s :: S). Term s 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 :: forall (a :: S -> Type). TestName -> (forall (s :: S). Term s a) -> GoldenTestTree Source #
Like testEval but will append to goldens created by enclosing plutarchGolden
Since: 1.0.0
goldenEvalWithConfig :: forall (a :: S -> Type). Config -> TestName -> (forall (s :: S). Term s a) -> GoldenTestTree Source #
As goldenEval, but allows setting the Config to use for compiling the
script.
Since: 1.0.3
goldenEvalFail :: forall (a :: S -> Type). TestName -> (forall (s :: S). Term s a) -> GoldenTestTree Source #
Like testEvalFail but will append to goldens created by enclosing plutarchGolden
Since: 1.0.0