Skip to content

Commit

Permalink
test(#1887) (#1918)
Browse files Browse the repository at this point in the history
* test(#1887): add test

Adding the test case described in #1887

* test(#1887): set test title according to issue title
  • Loading branch information
mgred authored and mroderick committed Oct 7, 2018
1 parent b45904d commit eae7d4a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/issues/issues-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -548,4 +548,16 @@ describe("issues", function () {
assert.same(result, undefined); //[ERR_ASSERTION]: 5 === undefined
});
});

describe("#1887", function () {
it("should not break stub behavior using multiple `match.any`", function () {
var stub = sinon.stub();

stub.withArgs(sinon.match.any, sinon.match.any, sinon.match("a")).returns("a");
stub.withArgs(sinon.match.any, sinon.match.any, sinon.match("b")).returns("b");

assert.equals(stub({}, [], "a"), "a");
assert.equals(stub({}, [], "b"), "b");
});
});
});

0 comments on commit eae7d4a

Please sign in to comment.