Skip to content

Commit a340eb2

Browse files
Removed broken tests
DSpace#2371 (comment)
1 parent db710c5 commit a340eb2

2 files changed

Lines changed: 1 addition & 41 deletions

File tree

src/app/core/data/external-source-data.service.spec.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,6 @@ describe('ExternalSourceService', () => {
9696
result.pipe(take(1)).subscribe();
9797
expect(requestService.send).toHaveBeenCalledWith(jasmine.any(GetRequest), false);
9898
});
99-
100-
it('should return the entries', () => {
101-
result.subscribe((resultRD) => {
102-
expect(resultRD.payload.page).toBe(entries);
103-
});
104-
});
10599
});
106100
});
107101
});

src/app/shared/notifications/notifications.reducers.spec.ts

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { notificationsReducer } from './notifications.reducers';
22
import { NewNotificationAction, RemoveAllNotificationsAction, RemoveNotificationAction } from './notifications.actions';
33
import { NotificationsService } from './notifications.service';
4-
import { fakeAsync, flush, inject, TestBed, tick } from '@angular/core/testing';
4+
import { TestBed } from '@angular/core/testing';
55
import { NotificationsBoardComponent } from './notifications-board/notifications-board.component';
66
import { StoreModule } from '@ngrx/store';
77
import { NotificationComponent } from './notification/notification.component';
@@ -106,38 +106,4 @@ describe('Notifications reducer', () => {
106106
expect(state3.length).toEqual(0);
107107
});
108108

109-
it('should create 2 notifications and check they close after different timeout', fakeAsync(() => {
110-
inject([ChangeDetectorRef], (cdr: ChangeDetectorRef) => {
111-
const optionsWithTimeout = new NotificationOptions(
112-
1000,
113-
true,
114-
NotificationAnimationsType.Rotate);
115-
// Timeout 1000ms
116-
const notification = new Notification(uniqueId(), NotificationType.Success, 'title', 'content', optionsWithTimeout, null);
117-
const state = notificationsReducer(undefined, new NewNotificationAction(notification));
118-
expect(state.length).toEqual(1);
119-
120-
// Timeout default 5000ms
121-
const notificationBis = new Notification(uniqueId(), NotificationType.Success, 'title', 'content');
122-
const stateBis = notificationsReducer(state, new NewNotificationAction(notification));
123-
expect(stateBis.length).toEqual(2);
124-
125-
tick(1000);
126-
cdr.detectChanges();
127-
128-
const action = new NewNotificationAction(notification);
129-
action.type = 'NothingToDo, return only the state';
130-
131-
const lastState = notificationsReducer(stateBis, action);
132-
expect(lastState.length).toEqual(1);
133-
134-
flush();
135-
cdr.detectChanges();
136-
137-
const finalState = notificationsReducer(lastState, action);
138-
expect(finalState.length).toEqual(0);
139-
});
140-
141-
}));
142-
143109
});

0 commit comments

Comments
 (0)