Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing documentation for .toThrow('foo') #1207

Closed
xanticious opened this issue Sep 13, 2016 · 1 comment
Closed

Missing documentation for .toThrow('foo') #1207

xanticious opened this issue Sep 13, 2016 · 1 comment
Labels

Comments

@xanticious
Copy link

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).

@slackersoft
Copy link
Member

The source for the Jasmine documentation has its own github repository. We do accept pull requests for our documentation, if you'd like to help out, or issues if you have things you'd like see addressed but aren't sure how.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants