|
@@ -58,7 +58,13 @@ describe('AlertStore', function () {
|
|
expect(AlertStore.alerts[1].key).toEqual(3);
|
|
expect(AlertStore.alerts[1].key).toEqual(3);
|
|
});
|
|
});
|
|
it('should persist removal of persistent alerts', function () {
|
|
it('should persist removal of persistent alerts', function () {
|
|
- const alert = {key: 1, id: 'test', message: 'foo', type: 'error'};
|
|
|
|
|
|
+ const alert = {
|
|
|
|
+ key: 1,
|
|
|
|
+ id: 'test',
|
|
|
|
+ message: 'this is a test',
|
|
|
|
+ type: 'error',
|
|
|
|
+ } as const;
|
|
|
|
+
|
|
AlertStore.closeAlert(alert);
|
|
AlertStore.closeAlert(alert);
|
|
AlertStore.addAlert(alert);
|
|
AlertStore.addAlert(alert);
|
|
expect(AlertStore.alerts).toHaveLength(0);
|
|
expect(AlertStore.alerts).toHaveLength(0);
|