From b0fee33bf0010dcc37fe165d5d26e94dbc549100 Mon Sep 17 00:00:00 2001 From: Flarna Date: Thu, 11 Jan 2018 00:26:30 +0100 Subject: [PATCH] [sinon] add spy.resetHistory() (#22807) --- types/sinon/index.d.ts | 2 ++ types/sinon/sinon-tests.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/types/sinon/index.d.ts b/types/sinon/index.d.ts index 90e352f1cb..f0433a694e 100644 --- a/types/sinon/index.d.ts +++ b/types/sinon/index.d.ts @@ -87,7 +87,9 @@ declare namespace Sinon { invokeCallback(...args: any[]): void; getCall(n: number): SinonSpyCall; getCalls(): SinonSpyCall[]; + /// @deprecated Use resetHistory() instead reset(): void; + resetHistory(): void; printf(format: string, ...args: any[]): string; restore(): void; } diff --git a/types/sinon/sinon-tests.ts b/types/sinon/sinon-tests.ts index 846edd45d5..2e2286e538 100644 --- a/types/sinon/sinon-tests.ts +++ b/types/sinon/sinon-tests.ts @@ -157,6 +157,7 @@ function testSymbolMatch() { function testResetHistory() { sinon.stub().resetHistory(); + sinon.spy().resetHistory(); } function testUsingPromises() {