From b36db09c26eb249347e0ddcbcf44d1305482fd5f Mon Sep 17 00:00:00 2001 From: Shubh Bapna <38372682+shubhbapna@users.noreply.github.com> Date: Fri, 4 Aug 2023 15:39:03 -0400 Subject: [PATCH] feat: expose `cleanAll` method to clean up mocks (#74) --- src/moctokit/moctokit.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/moctokit/moctokit.ts b/src/moctokit/moctokit.ts index 6b58bfe..a9f3e22 100644 --- a/src/moctokit/moctokit.ts +++ b/src/moctokit/moctokit.ts @@ -1,4 +1,5 @@ import endpointToMethod from "@mg/moctokit/generated/endpoint-request"; +import nock from "nock"; export class Moctokit { private _rest; @@ -9,4 +10,8 @@ export class Moctokit { get rest() { return this._rest; } + + cleanAll() { + nock.cleanAll(); + } }