Merge pull request #15545 from Flarna/sinon_sandbox_reset

[sinon] Add reset(), resetBehavior() and resetHistory() to sandbox
This commit is contained in:
Nathan Shively-Sanders
2017-03-31 10:06:23 -07:00
committed by GitHub
2 changed files with 6 additions and 0 deletions

View File

@@ -404,6 +404,9 @@ declare namespace Sinon {
useFakeXMLHttpRequest: SinonFakeXMLHttpRequestStatic;
useFakeServer(): SinonFakeServer;
restore(): void;
reset(): void;
resetHistory(): void;
resetBehavior(): void;
}
interface SinonSandboxStatic {

View File

@@ -98,6 +98,9 @@ function testSandbox() {
sandbox.useFakeXMLHttpRequest();
sandbox.useFakeServer();
sandbox.restore();
sandbox.reset();
sandbox.resetHistory();
sandbox.resetBehavior();
}
function testPromises() {