diff --git a/__tests__/reducers/bookmarks.spec.ts b/__tests__/reducers/bookmarks.spec.ts index 9a0b1b7a1..2cbb77503 100644 --- a/__tests__/reducers/bookmarks.spec.ts +++ b/__tests__/reducers/bookmarks.spec.ts @@ -75,8 +75,14 @@ describe( 'notification reducer', () => { } ); describe( 'UI_RESET_STORE', () => { - const bookmarksPostLogout = bookmarks( [{ url: 'i should not exist' }], { - type: TABS_TYPES.RESET_STORE + const state = [ + { url: 'safe-auth://home/#/login' }, + { url: 'i should not exist' }, + { url: 'i should not exist 1' } + ]; + + const bookmarksPostLogout = bookmarks( state, { + type: TABS_TYPES.TABS_RESET_STORE } ); it( 'should reset bookmarks to inital state', () => { diff --git a/app/reducers/bookmarks.ts b/app/reducers/bookmarks.ts index ab78061ff..52ef39d9d 100644 --- a/app/reducers/bookmarks.ts +++ b/app/reducers/bookmarks.ts @@ -31,7 +31,7 @@ const addBookmark = ( state, bookmark ) => { */ const removeBookmark = ( state, payload ) => { const removalIndex = state.findIndex( - bookmark => bookmark.url === payload.url + ( bookmark ) => bookmark.url === payload.url ); const updatedState = [...state]; @@ -96,7 +96,7 @@ export function bookmarks( state: Array<{}> = initialState, action ): Array<{}> return _.uniqBy( newBookmarks, 'url' ); } - case TABS_TYPES.RESET_STORE: { + case TABS_TYPES.TABS_RESET_STORE: { const initial = initialState; return [...initial]; }