File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,23 @@ describe('Tests for NotificationsStore', function () {
149149
150150 } ) ;
151151
152+ it ( 'should mark a notification as read - remove single notification from store' , function ( ) {
153+
154+ spyOn ( NotificationsStore , 'trigger' ) ;
155+
156+ NotificationsStore . _notifications = [ 'abc' , 'def' ] ;
157+
158+ expect ( NotificationsStore . _notifications . length ) . toBe ( 2 ) ;
159+
160+ Actions . removeNotification ( 'abc' ) ;
161+
162+ jest . runAllTimers ( ) ;
163+
164+ expect ( NotificationsStore . _notifications . length ) . toBe ( 1 ) ;
165+ expect ( NotificationsStore . trigger ) . toHaveBeenCalled ( ) ;
166+
167+ } ) ;
168+
152169 it ( 'should mark a repo as read - remove notifications from store' , function ( ) {
153170
154171 spyOn ( NotificationsStore , 'trigger' ) ;
You can’t perform that action at this time.
0 commit comments