moll / js-must

An assertion library for JavaScript and Node.js with a friendly BDD syntax (awesome.must.be.true()). It ships with many expressive matchers and is test runner and framework agnostic. Follows RFC 2119 with its use of MUST. Good stuff and well tested.
Other
336 stars 35 forks source link

Fix for undefined Error.captureStackTrace. #10

Closed incrop closed 10 years ago

incrop commented 10 years ago

Error.captureStackTrace is a v8 extension, in other browsers (Firefox, PhantomJS...) failed assertion yields exception with message like Error.captureStackTrace is not a function.

moll commented 10 years ago

Hey!

Thanks for taking the time to improve this! Yeah, Must.js was originally focusing on V8, but it makes perfect sense to not require it.

Would you mind doing me a small favor and amending the commit (git commit --amend) to break the line after the if? No need for curly braces. I'm really anal about 80-column lines. :) Or if you don't have the time, I can amend it myself before the merge.

incrop commented 10 years ago

No problem. If you don't mind I also rearranged expression a little because that was 81-column. :)

arikon commented 10 years ago

@moll Would you mind merging it?

moll commented 10 years ago

@arikon And done! :)

Thank you, Dmitry @incrop, for your help!

Released v0.11 with this addition included a second ago, too.