Skip to content

Instantly share code, notes, and snippets.

@dtinth
Created March 4, 2013 14:22
Show Gist options
  • Save dtinth/5082537 to your computer and use it in GitHub Desktop.
Save dtinth/5082537 to your computer and use it in GitHub Desktop.
> var chai = require('chai')
> chai.use(require('chai-as-promised'))
> var q = require('q')
> chai.should()
> var r = q.resolve(555).should.eventually.equal(3)
> var e
> r.fail(function(err) { e = err })
> e
{ message: 'expected 555 to equal 3',
actual:
{ ... },
expected: 3,
operator: undefined,
showDiff: true }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment