Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- diffVsGoldenFile :: HasCallStack => Member Hedgehog r => Member (Embed IO) r => Member Resource r => Member Log r => String -> FilePath -> Sem r ()
- diffFileVsGoldenFile :: HasCallStack => Member (Embed IO) r => Member Hedgehog r => Member Log r => Member Resource r => FilePath -> FilePath -> Sem r ()
Documentation
:: HasCallStack | |
=> Member Hedgehog r | |
=> Member (Embed IO) r | |
=> Member Resource r | |
=> Member Log r | |
=> String | Actual content |
-> FilePath | Reference file |
-> Sem r () |
Diff contents against the golden file. If CREATE_GOLDEN_FILES environment is set to "1", then should the golden file not exist it would be created. If RECREATE_GOLDEN_FILES is set to "1", then should the golden file exist it would be recreated. If GOLDEN_FILE_LOG_FILE is set to a filename, then the golden file path will be logged to the specified file.
Set the environment variable when you intend to generate or re-generate the golden file for example when running the test for the first time or if the golden file genuinely needs to change.
To re-generate a golden file you must also delete the golden file because golden files are never overwritten.
TODO: Improve the help output by saying the difference of each input.
:: HasCallStack | |
=> Member (Embed IO) r | |
=> Member Hedgehog r | |
=> Member Log r | |
=> Member Resource r | |
=> FilePath | Actual file |
-> FilePath | Reference file |
-> Sem r () |
Diff file against the golden file. If CREATE_GOLDEN_FILES environment is set to "1", then should the gold file not exist it would be created. If GOLDEN_FILE_LOG_FILE is set to a filename, then the golden file path will be logged to the specified file.
Set the environment variable when you intend to generate or re-generate the golden file for example when running the test for the first time or if the golden file genuinely needs to change.
To re-generate a golden file you must also delete the golden file because golden files are never overwritten.