juliemr/minijasminenode — pull request #11 by kfishkin (2014-02-11 22:11:54+00:00)
Title: adds because() clause

This adds custom error message capability. The usage is that you can do
because(whatever).expect(a).toBe(b)

if the expectation fails, then 'whatever' is prepended to the error message. This is handy when trying to disambiguate between varying error messages, or unclear ones. For example,
because(string1).expect(string1.indexOf('x')).toEqual(-1)
would now print string 1, instead of just saying "expected 3 to equal -1"