@@ -240,6 +240,12 @@ const mockRouter = createMemoryRouter([
240
240
}
241
241
] ) ;
242
242
243
+ const mockVscodeSlice = {
244
+ vscode : {
245
+ isVscode : false
246
+ }
247
+ } ;
248
+
243
249
const mockStates = {
244
250
router : mockRouter ,
245
251
session : {
@@ -255,7 +261,8 @@ const mockStates = {
255
261
} ,
256
262
workspaces : {
257
263
assessment : { currentAssessment : mockAssessment . id }
258
- }
264
+ } ,
265
+ ...mockVscodeSlice
259
266
} ;
260
267
261
268
const okResp = { ok : true } ;
@@ -362,7 +369,7 @@ describe('Test FETCH_AUTH action', () => {
362
369
}
363
370
]
364
371
] )
365
- . withState ( { session : mockTokens } ) // need to mock tokens for updateLatestViewedCourse call
372
+ . withState ( { session : mockTokens , ... mockVscodeSlice } ) // need to mock tokens for updateLatestViewedCourse call
366
373
. call ( postAuth , code , providerId , clientId , redirectUrl )
367
374
. put ( SessionActions . setTokens ( mockTokens ) )
368
375
. call ( getUser , mockTokens )
@@ -377,7 +384,7 @@ describe('Test FETCH_AUTH action', () => {
377
384
378
385
test ( 'when user is null' , ( ) => {
379
386
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
381
388
. provide ( [
382
389
[ call ( postAuth , code , providerId , clientId , redirectUrl ) , mockTokens ] ,
383
390
[
0 commit comments