You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The jasmine documentation for 'toThrow()' fails to mention the following useful feature.
it("The 'toThrow' matcher can also test for specific strings being thrown", function() {
var foo = function() {
throw 'foo';
};
expect(foo).toThrow('foo');
expect(foo).not.toThrow('bar');
});
This is different than ".toThrowError" (which expects a "new Error" object to be thrown).
(Only by stepping through the source code did I discover this undocumented feature).
The text was updated successfully, but these errors were encountered:
The jasmine documentation for 'toThrow()' fails to mention the following useful feature.
This is different than ".toThrowError" (which expects a "new Error" object to be thrown).
(Only by stepping through the source code did I discover this undocumented feature).
The text was updated successfully, but these errors were encountered: