Skip to content

Instantly share code, notes, and snippets.

@NouranMahmoud
Last active August 29, 2015 14:10
Show Gist options
  • Save NouranMahmoud/e4362d27a566734f938e to your computer and use it in GitHub Desktop.
Save NouranMahmoud/e4362d27a566734f938e to your computer and use it in GitHub Desktop.
promises test
it 'should reject the promise when there are no passed options ', (done)->
user = new ObjectRef '/users/123/'
result = user.get()
expect(result.isRejected()).toBeTruthy()
result.then null, (err) ->
console.log err
expect(err).toThrow new ReallyError 'Can\'t be called without passing arguments'
done()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment