Skip to content
New issue

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

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

Already on GitHub? # to your account

toThrow does not catch falsy exceptions #371

Closed
rbu opened this issue May 27, 2013 · 1 comment
Closed

toThrow does not catch falsy exceptions #371

rbu opened this issue May 27, 2013 · 1 comment

Comments

@rbu
Copy link

rbu commented May 27, 2013

    it("should detect falsy exceptions as thrown", function() {
        expect(function() { throw undefined}).toThrow();
        expect(function() { throw ''}).toThrow();
    });

Currently yields:
Expected function to throw an exception.

@infews
Copy link
Contributor

infews commented May 27, 2013

We track these in our Tracker backlog.

I created this story for this bug.

Thanks for the find!

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants