You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any time this._testRunner.spyOn() is called, the spy return value should be stored in some sort of instance cache, then resetSpyMsal() loops through this cache and calls .mockReset() on each spy present. Many calls to spyOn() are already cached in "private" instance properties, so the bulk of the work would be figuring out the best caching approach (this._spies = new Map<string, jest.Spied<unknown>>(), a private _createSpy(obj, methodName): jest.Spied<typeof obj[methodName]> method that could do the Map bookkeeping, _getSpy(methodName): jest.Spied<unknown> to simplify retrieval inside various assertions, and so on).
When calling resetSpyMsal(), every mock of the test-runner is reset, which causes issues when one is also mocking other functionality than MSAL.
Is there a possibility to only reset mocks related to MSAL?
The text was updated successfully, but these errors were encountered: