1- import { testSaga } from " redux-saga-test-plan"
2- import WorkspaceActions from " src/commons/workspace/WorkspaceActions"
1+ import { testSaga } from ' redux-saga-test-plan' ;
2+ import WorkspaceActions from ' src/commons/workspace/WorkspaceActions' ;
33
4- import { combineSagaHandlers , createActions } from " ../utils"
4+ import { combineSagaHandlers , createActions } from ' ../utils' ;
55
66// Would have used spyOn, but for some reason that doesn't work properly
77jest . mock ( 'src/commons/sagas/SafeEffects' , ( ) => ( {
88 ...jest . requireActual ( 'src/commons/sagas/SafeEffects' ) ,
99 // Mock wrap saga to just be a passthrough so that the identity
1010 // checking that testSaga uses will pass
1111 wrapSaga : ( x : any ) => x
12- } ) )
12+ } ) ) ;
1313
1414test ( 'test combineSagaHandlers' , ( ) => {
15- const mockTakeEveryHandler = jest . fn ( )
16- const mockTakeLatestHandler = jest . fn ( )
17- const mockTakeLeadingHandler = jest . fn ( )
15+ const mockTakeEveryHandler = jest . fn ( ) ;
16+ const mockTakeLatestHandler = jest . fn ( ) ;
17+ const mockTakeLeadingHandler = jest . fn ( ) ;
1818
1919 const saga = combineSagaHandlers ( {
2020 [ WorkspaceActions . toggleUsingUpload . type ] : mockTakeEveryHandler ,
@@ -31,13 +31,13 @@ test('test combineSagaHandlers', () => {
3131 takeEvery : mockTakeEveryHandler ,
3232 takeLeading : mockTakeLeadingHandler
3333 }
34- } )
34+ } ) ;
3535
3636 testSaga ( saga )
3737 . next ( )
3838 . takeEvery ( WorkspaceActions . toggleUsingUpload . type , mockTakeEveryHandler )
3939 . next ( )
40- . takeEvery ( WorkspaceActions . toggleFolderMode . type , mockTakeEveryHandler )
40+ . takeEvery ( WorkspaceActions . toggleFolderMode . type , mockTakeEveryHandler )
4141 . next ( )
4242 . takeLatest ( WorkspaceActions . toggleUsingCse . type , mockTakeLatestHandler )
4343 . next ( )
@@ -47,23 +47,23 @@ test('test combineSagaHandlers', () => {
4747 . next ( )
4848 . takeLeading ( WorkspaceActions . toggleEditorAutorun . type , mockTakeLeadingHandler )
4949 . next ( )
50- . isDone ( )
51- } )
50+ . isDone ( ) ;
51+ } ) ;
5252
5353test ( 'createActions' , ( ) => {
5454 const actions = createActions ( 'workspace' , {
5555 act0 : false ,
5656 act1 : ( value : string ) => ( { value } ) ,
5757 act2 : 525600
58- } )
58+ } ) ;
5959
60- const act0 = actions . act0 ( )
61- expect ( act0 . type ) . toEqual ( 'workspace/act0' )
60+ const act0 = actions . act0 ( ) ;
61+ expect ( act0 . type ) . toEqual ( 'workspace/act0' ) ;
6262
63- const act1 = actions . act1 ( 'test' )
64- expect ( act1 . type ) . toEqual ( 'workspace/act1' )
65- expect ( act1 . payload ) . toMatchObject ( { value : 'test' } )
63+ const act1 = actions . act1 ( 'test' ) ;
64+ expect ( act1 . type ) . toEqual ( 'workspace/act1' ) ;
65+ expect ( act1 . payload ) . toMatchObject ( { value : 'test' } ) ;
6666
67- const act2 = actions . act2 ( )
68- expect ( act2 . type ) . toEqual ( 'workspace/act2' )
69- } )
67+ const act2 = actions . act2 ( ) ;
68+ expect ( act2 . type ) . toEqual ( 'workspace/act2' ) ;
69+ } ) ;
0 commit comments