-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow messages to be passed through for "should.become"
- Loading branch information
Showing
2 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
"use strict" | ||
|
||
describe "Custom messages", => | ||
promise = null | ||
message = "He told me enough! He told me you killed him!" | ||
|
||
beforeEach => | ||
promise = fulfilledPromise(42) | ||
return undefined | ||
|
||
describe "should pass through for .become(value, message) for 42", => | ||
shouldPass => promise.should.become(42, message) | ||
describe "should pass through for .become(value, message) for 52", => | ||
shouldFail | ||
op: => promise.should.become(52, message) | ||
message: message | ||
|
||
describe "should pass through for .not.become(42, message)", => | ||
shouldFail | ||
op: => promise.should.not.become(42, message) | ||
message: message | ||
describe "should pass through for .not.become(52, message)", => | ||
shouldPass => promise.should.not.become(52, message) | ||
|
||
describe "should pass through for .eventually.equal(42)", (done) => | ||
shouldPass => promise.should.eventually.equal(42, message) | ||
describe "should pass through for .not.eventually.equal(42)", (done) => | ||
shouldFail | ||
op: => promise.should.not.eventually.equal(42, message) | ||
message: message |