Skip to content

Commit

Permalink
Step 5: Write the second failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
searls committed Dec 23, 2017
1 parent d9d30f9 commit 33b6e49
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/unit/verify/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ module.exports = {
assert.equal(td.explain(fail).callCount, 0)
},
'demonstrated call DID NOT occur, failing test': () => {
const double = new Double()
const call = new Call()
CallLog.instance.log(double, call)
const config = {some: 'option'}
td.when(didCallOccur(double, call, config)).thenReturn(false)

subject(/*imagine double('a','b','X')*/ undefined, config)

td.verify(ensureDemonstration(call))
td.verify(fail(double, call, config))
assert.equal(td.explain(notifySatisfiedMatchers).callCount, 0)
assert.equal(td.explain(warnIfAlsoStubbed).callCount, 0)
},
'demonstration missing blows up': () => {
}
Expand Down

0 comments on commit 33b6e49

Please sign in to comment.