Hacker News new | ask | show | jobs
by Jacob4u2 4716 days ago
Seems like the author combined the spec side of mocha with should.js and a stub/mocking library, focused it on node and polished it up with some neat conventions and utilities.

I'll probably give it a shot on my next project. I'm interested in finding out if it went the route of throwing exceptions for error reporting like mocha, or something else.

1 comments

I didn't followed that approach, matchers (like in RSpec) returns a boolean (or a promise of a boolean value). Errors raised in a matcher will be catched and, as in RSpec, will flag the test as errored (and not as failed). I've always found it more useful to detect when something went wrong in your test setup than failures.