In my code I throw message:
var err = new Error();
func1: function(){
err.name = "error1";
throw(err);
},
I tried to catch this error in Jasmine in two options:
expect(func1().toThrow("error1");
expect(func1().toThrow(new Error("error1"))
The problem that Jasmine failed and don't check this error. Did I miss something ?