You need to instantiate ArgumentError for this to work:
julia> @test_throws ArgumentError throw(ArgumentError("hi"))
Test Passed
Thrown: ArgumentError
You need to instantiate ArgumentError for this to work:
julia> @test_throws ArgumentError throw(ArgumentError("hi"))
Test Passed
Thrown: ArgumentError