@@ -240,6 +240,12 @@ const mockRouter = createMemoryRouter([
240240 }
241241] ) ;
242242
243+ const mockVscodeSlice = {
244+ vscode : {
245+ isVscode : false
246+ }
247+ } ;
248+
243249const mockStates = {
244250 router : mockRouter ,
245251 session : {
@@ -255,7 +261,8 @@ const mockStates = {
255261 } ,
256262 workspaces : {
257263 assessment : { currentAssessment : mockAssessment . id }
258- }
264+ } ,
265+ ...mockVscodeSlice
259266} ;
260267
261268const okResp = { ok : true } ;
@@ -362,7 +369,7 @@ describe('Test FETCH_AUTH action', () => {
362369 }
363370 ]
364371 ] )
365- . withState ( { session : mockTokens } ) // need to mock tokens for updateLatestViewedCourse call
372+ . withState ( { session : mockTokens , ... mockVscodeSlice } ) // need to mock tokens for updateLatestViewedCourse call
366373 . call ( postAuth , code , providerId , clientId , redirectUrl )
367374 . put ( SessionActions . setTokens ( mockTokens ) )
368375 . call ( getUser , mockTokens )
@@ -377,7 +384,7 @@ describe('Test FETCH_AUTH action', () => {
377384
378385 test ( 'when user is null' , ( ) => {
379386 return expectSaga ( BackendSaga )
380- . withState ( { session : mockTokens } ) // need to mock tokens for the selectTokens() call
387+ . withState ( { session : mockTokens , ... mockVscodeSlice } ) // need to mock tokens for the selectTokens() call
381388 . provide ( [
382389 [ call ( postAuth , code , providerId , clientId , redirectUrl ) , mockTokens ] ,
383390 [
0 commit comments