Created
February 19, 2015 11:57
-
-
Save kdabir/45b86a217921ddb83894 to your computer and use it in GitHub Desktop.
mocha chai assert throwing exception
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# will not work | |
expect(new MyObject("with invlaid data")).to.throw(Error) | |
# give a function to expect | |
expect( -> new MyObject("with invlaid data")).to.throw(Error) | |
# this should work |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment