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
Copy file name to clipboardExpand all lines: src/infrastructure/sagas/__tests__/toastrSaga.spec.js
-44Lines changed: 0 additions & 44 deletions
Original file line number
Diff line number
Diff line change
@@ -17,50 +17,6 @@ beforeEach(() => {
17
17
jest.resetAllMocks();
18
18
});
19
19
describe('saga behavior',()=>{
20
-
describe('FETCHED_ACTIVE_THREADS_SUCCESS',()=>{
21
-
it('should display a warning if user has over 100 threads',()=>{
22
-
constthreads=[];
23
-
for(leti=0;i<101;i++){
24
-
threads.push({});
25
-
}
26
-
constaction={
27
-
type: actions.FETCHED_ACTIVE_THREADS_SUCCESS,
28
-
data: { threads }
29
-
};
30
-
constsaga=newSagaTestWrapper(toastrSaga);
31
-
returnsaga.execute(action)
32
-
.then(()=>{
33
-
expect(toastr.light).toHaveBeenCalledTimes(1);
34
-
expect(toastr.light).toHaveBeenLastCalledWith('Retrieving more than 100 threads; loading may take several minutes. Archive some threads to reduce loading time.',{status: 'info'});
35
-
});
36
-
});
37
-
it('should display no warning if user has 100 threads or less',()=>{
38
-
constthreads=[];
39
-
for(leti=0;i<100;i++){
40
-
threads.push({});
41
-
}
42
-
constaction={
43
-
type: actions.FETCHED_ACTIVE_THREADS_SUCCESS,
44
-
data: { threads }
45
-
};
46
-
constsaga=newSagaTestWrapper(toastrSaga);
47
-
returnsaga.execute(action)
48
-
.then(()=>{
49
-
expect(toastr.light).toHaveBeenCalledTimes(0);
50
-
});
51
-
});
52
-
it('should display no warning if action has no data',()=>{
0 commit comments