`@test_throws ArgumentError throw(ArgumentError)` fails

You need to instantiate ArgumentError for this to work:

julia> @test_throws ArgumentError throw(ArgumentError("hi"))
Test Passed
      Thrown: ArgumentError
1 Like