From 893f366fdc768b5aea12688ae6387deb13f10c04 Mon Sep 17 00:00:00 2001 From: JesperSchultz Date: Thu, 18 Apr 2013 18:42:10 +0200 Subject: [PATCH] fix for combined matchers in sinon --- sinon/sinon-1.5.d.ts | 4 ++-- sinon/sinon-tests.ts | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sinon/sinon-1.5.d.ts b/sinon/sinon-1.5.d.ts index 07c4926508..7b0b43c58d 100644 --- a/sinon/sinon-1.5.d.ts +++ b/sinon/sinon-1.5.d.ts @@ -302,8 +302,8 @@ interface SinonStatic { } interface SinonMatcher { - and(expr: SinonMatch): SinonMatcher; - or(expr: SinonMatch): SinonMatcher; + and(expr: SinonMatcher): SinonMatcher; + or(expr: SinonMatcher): SinonMatcher; } interface SinonMatch { diff --git a/sinon/sinon-tests.ts b/sinon/sinon-tests.ts index 8247e36b31..4c508b1964 100644 --- a/sinon/sinon-tests.ts +++ b/sinon/sinon-tests.ts @@ -76,10 +76,15 @@ function testSeven() { mockObj.expects('functionToTest').once(); } +function testEight() { + var combinedMatcher = sinon.match.typeOf("object").and(sinon.match.has("pages")); +} + testOne(); testTwo(); testThree(); testFour(); testFive(); testSix(); -testSeven(); \ No newline at end of file +testSeven(); +testEight(); \ No newline at end of file