Skip to content

Simplify "should throw" #20

@tpetricek

Description

@tpetricek

Currently, you have to use ignore to discard the result in the function and you need to get type using typeof:

(fun () -> failwith "BOOM!" |> ignore) |> should throw typeof<System.Exception>

I think it would be neat if you could write just:

(fun () -> failwith "BOOM!") |> should throw<System.Exception>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions