Skip to content

Commit

Permalink
Add resetHandlers and resetHistory types
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianMitchL committed Apr 26, 2019
1 parent 0e6f790 commit 456d085
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions types/index.d.ts
Expand Up @@ -47,6 +47,8 @@ declare class MockAdapter {

adapter(): AxiosAdapter;
reset(): void;
resetHandlers(): void;
resetHistory(): void;
restore(): void;

history: { [method:string]:AxiosRequestConfig[]; };
Expand Down
8 changes: 8 additions & 0 deletions types/test.ts
Expand Up @@ -22,6 +22,14 @@ namespace SupportsReset {
mock.reset();
}

namespace SupportsResetHandlers {
mock.resetHandlers();
}

namespace SupportsResetHistory {
mock.resetHistory();
}

namespace SupportsRestore {
mock.restore();
}
Expand Down

0 comments on commit 456d085

Please sign in to comment.