diff --git a/sinon/sinon-1.5.d.ts b/sinon/sinon-1.5.d.ts index 098aca8a0f..07c4926508 100644 --- a/sinon/sinon-1.5.d.ts +++ b/sinon/sinon-1.5.d.ts @@ -142,7 +142,7 @@ interface SinonExpectationStatic { } interface SinonMock { - expects(method: string): SinonExpectationStatic; + expects(method: string): SinonExpectation; restore(): void; verify(): void; } diff --git a/sinon/sinon-tests.ts b/sinon/sinon-tests.ts index a9db8360d5..8247e36b31 100644 --- a/sinon/sinon-tests.ts +++ b/sinon/sinon-tests.ts @@ -69,9 +69,17 @@ function testSix() { stub.restore(); } +function testSeven() { + var obj = { functionToTest : function () { } }; + var mockObj = sinon.mock(obj); + obj.functionToTest(); + mockObj.expects('functionToTest').once(); +} + testOne(); testTwo(); testThree(); testFour(); testFive(); -testSix(); \ No newline at end of file +testSix(); +testSeven(); \ No newline at end of file