make skip functions make more sense

This commit is contained in:
rhiannon morris 2022-05-02 02:27:03 +02:00
parent e3384d4e6e
commit 434f0e08d1

View file

@ -84,13 +84,18 @@ export %inline
todo : String -> Test todo : String -> Test
todo label = todoWith label "" todo label = todoWith label ""
export %inline private %inline
skipWith : String -> String -> Test makeSkip : String -> String -> Test
skipWith label reason = One $ MakeTest label $ pure $ Skip reason makeSkip label reason = One $ MakeTest label $ pure $ Skip reason
export %inline export %inline
skip : String -> Test skipWith : Test -> String -> Test
skip label = skipWith label "" skipWith (One t) reason = makeSkip t.label reason
skipWith (Group l _) reason = makeSkip l reason
export %inline
skip : Test -> Test
skip test = skipWith test ""
export export
testThrows : Show a => String -> Lazy (Error es a) -> Test testThrows : Show a => String -> Lazy (Error es a) -> Test