diff --git a/types/sinon/index.d.ts b/types/sinon/index.d.ts index 224ab4003f..4a02ec691a 100644 --- a/types/sinon/index.d.ts +++ b/types/sinon/index.d.ts @@ -394,6 +394,7 @@ declare namespace Sinon { } interface SinonSandbox { + assert: SinonAssert; clock: SinonFakeTimers; requests: SinonFakeXMLHttpRequest; server: SinonFakeServer; @@ -407,6 +408,8 @@ declare namespace Sinon { reset(): void; resetHistory(): void; resetBehavior(): void; + verify(): void; + verifyAndRestore(): void; } interface SinonSandboxStatic { diff --git a/types/sinon/sinon-tests.ts b/types/sinon/sinon-tests.ts index 8354045a25..2637d92c33 100644 --- a/types/sinon/sinon-tests.ts +++ b/types/sinon/sinon-tests.ts @@ -90,6 +90,9 @@ function testNine() { function testSandbox() { var sandbox = sinon.sandbox.create(); + + sandbox.assert.notCalled(sinon.spy()); + if (sandbox.spy().called) { sandbox.stub(objectUnderTest, "process").yieldsTo("success"); sandbox.mock(objectUnderTest).expects("process").once(); @@ -101,6 +104,8 @@ function testSandbox() { sandbox.reset(); sandbox.resetHistory(); sandbox.resetBehavior(); + sandbox.verify(); + sandbox.verifyAndRestore(); } function testPromises() {