Skip to content

Commit

Permalink
Added test for errored test including seed
Browse files Browse the repository at this point in the history
  • Loading branch information
sksamuel committed Jan 29, 2021
1 parent 2fb3188 commit 7827962
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -42,4 +42,10 @@ class SeedTest : FunSpec({
forAll<Int, Int>(config = PropTestConfig(seed = 12345)) { a, b -> a + b == b + 1 }
}.message.shouldContain("Repeat this test by using seed 12345")
}

test("errored test should print seed") {
shouldThrowAny {
checkAll<Int, Int> { _, _ -> error("boom") }
}.message.shouldContain("Repeat this test by using seed")
}
})

0 comments on commit 7827962

Please sign in to comment.