Skip to content

Commit

Permalink
Update documentation tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Sep 20, 2015
1 parent 2e2779b commit 16af405
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions test/documentation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,22 @@ describe("documentation tests", function () {
);
}

var spy1 = sinon.spy().named('spy1');
var spy2 = sinon.spy().named('spy2');
spy1();
spy2();
spy1();

expect([spy1, spy2, spy1], 'given call order');

try {
var spy1 = sinon.spy().named('spy1');
var spy2 = sinon.spy().named('spy2');
spy1();
spy2();
spy1();

expect([spy1, spy2, spy2], 'given call order');
expect.fail(function (output) {
output.error("expected:").nl();
output.code("var spy1 = sinon.spy().named('spy1');").nl();
output.code("var spy2 = sinon.spy().named('spy2');").nl();
output.code("spy1();").nl();
output.code("spy2();").nl();
output.code("spy1();").nl();
output.code("").nl();
output.code("expect([spy1, spy2, spy2], 'given call order');").nl();
output.error("to throw");
});
Expand Down

0 comments on commit 16af405

Please sign in to comment.