mirror of
https://github.com/Smaug123/WoofWare.Expect
synced 2025-10-05 12:38:39 +00:00
Add syntax for exceptions (#19)
This commit is contained in:
@@ -44,6 +44,13 @@ let ``This test fails: plain text comparison of ToString`` () =
|
||||
snapshot " 123 "
|
||||
return 123
|
||||
}
|
||||
|
||||
[<Test>]
|
||||
let ``With return! and snapshotThrows, you can see exceptions too`` () =
|
||||
expect {
|
||||
snapshotThrows @"System.Exception: oh no"
|
||||
return! (fun () -> failwith<int> "oh no")
|
||||
}
|
||||
```
|
||||
|
||||
You can adjust the formatting:
|
||||
|
Reference in New Issue
Block a user