tasty-mgolden-0.0.2: Golden testing provider for tasty with muti-line diff output

Safe HaskellNone
LanguageHaskell2010

Test.Tasty.MGolden

Description

Golden testing provider for tasty

This module implements the golden testing pattern.

Please refer to the README.md for usage instructions.

Synopsis

Documentation

data Mode Source #

Golden test run mode

Constructors

RunTest

Run the tests, error (with diff) on actual vs expectation mismatch

UpdateExpected

Run the tests, update the expectation on actual vs expectation mismatch

Instances
Eq Mode Source # 
Instance details

Defined in Test.Tasty.MGolden

Methods

(==) :: Mode -> Mode -> Bool #

(/=) :: Mode -> Mode -> Bool #

Ord Mode Source # 
Instance details

Defined in Test.Tasty.MGolden

Methods

compare :: Mode -> Mode -> Ordering #

(<) :: Mode -> Mode -> Bool #

(<=) :: Mode -> Mode -> Bool #

(>) :: Mode -> Mode -> Bool #

(>=) :: Mode -> Mode -> Bool #

max :: Mode -> Mode -> Mode #

min :: Mode -> Mode -> Mode #

Show Mode Source # 
Instance details

Defined in Test.Tasty.MGolden

Methods

showsPrec :: Int -> Mode -> ShowS #

show :: Mode -> String #

showList :: [Mode] -> ShowS #

IsOption Mode Source # 
Instance details

Defined in Test.Tasty.MGolden

diffTest Source #

Arguments

:: String

Name of the test

-> IO (Text, Text)

action to produce expectation

-> TestTree 

Define a diff test

goldenTest Source #

Arguments

:: String

Name of the test

-> FilePath

Path of the expectation file

-> IO Text

Test action

-> TestTree 

Define a golden test

printDetails Source #

Arguments

:: (Text -> IO ())

line printer

-> Text

expected text

-> Text

actual (observed) text

-> ResultDetailsPrinter 

Golden test diff details printer