diff --git a/__tests__/identity.js b/__tests__/identity.js index daad6c3..0ac7f31 100644 --- a/__tests__/identity.js +++ b/__tests__/identity.js @@ -599,10 +599,7 @@ describe('Identity', () => { const MOCK_TAB_ID = 1234; const spy = jest.spyOn(Identity.prototype, '_getTabId'); spy.mockImplementation(() => MOCK_TAB_ID); - - identity = new Identity(defaultOptions); - identity._sessionService.fetch = getSessionMock; - identity._clearVarnishCookie(); + identity._tabId = MOCK_TAB_ID; await identity.hasSession(); diff --git a/src/identity.js b/src/identity.js index 0e6e6f6..f9b53d3 100644 --- a/src/identity.js +++ b/src/identity.js @@ -234,7 +234,7 @@ export class Identity extends EventEmitter { * Checks if getting session is blocked * @private * - * @returns {number} + * @returns {number/null} */ _isSessionCallBlocked(){ return this.localStorageCache.get(SESSION_CALL_BLOCKED_CACHE_KEY);