diff --git a/src/app/core/cache/object-cache.reducer.spec.ts b/src/app/core/cache/object-cache.reducer.spec.ts index 919edc8e57..df22a65da7 100644 --- a/src/app/core/cache/object-cache.reducer.spec.ts +++ b/src/app/core/cache/object-cache.reducer.spec.ts @@ -126,6 +126,10 @@ describe('objectCacheReducer', () => { deepFreeze(state); objectCacheReducer(state, action); + + // no expect required, deepFreeze will ensure an exception is thrown if the state + // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should remove the specified object from the cache in response to the REMOVE action', () => { @@ -149,6 +153,10 @@ describe('objectCacheReducer', () => { const action = new RemoveFromObjectCacheAction(selfLink1); // testState has already been frozen above objectCacheReducer(testState, action); + + // no expect required, deepFreeze will ensure an exception is thrown if the state + // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should set the timestamp of all objects in the cache in response to a RESET_TIMESTAMPS action', () => { @@ -164,6 +172,10 @@ describe('objectCacheReducer', () => { const action = new ResetObjectCacheTimestampsAction(new Date().getTime()); // testState has already been frozen above objectCacheReducer(testState, action); + + // no expect required, deepFreeze will ensure an exception is thrown if the state + // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should perform the ADD_PATCH action without affecting the previous state', () => { @@ -174,6 +186,10 @@ describe('objectCacheReducer', () => { }]); // testState has already been frozen above objectCacheReducer(testState, action); + + // no expect required, deepFreeze will ensure an exception is thrown if the state + // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should when the ADD_PATCH action dispatched', () => { diff --git a/src/app/core/cache/server-sync-buffer.reducer.spec.ts b/src/app/core/cache/server-sync-buffer.reducer.spec.ts index 51ba010c1e..087080a194 100644 --- a/src/app/core/cache/server-sync-buffer.reducer.spec.ts +++ b/src/app/core/cache/server-sync-buffer.reducer.spec.ts @@ -52,12 +52,20 @@ describe('serverSyncBufferReducer', () => { const action = new AddToSSBAction(selfLink1, RestRequestMethod.POST); // testState has already been frozen above serverSyncBufferReducer(testState, action); + + // no expect required, deepFreeze will ensure an exception is thrown if the state + // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should perform the EMPTY action without affecting the previous state', () => { const action = new EmptySSBAction(); // testState has already been frozen above serverSyncBufferReducer(testState, action); + + // no expect required, deepFreeze will ensure an exception is thrown if the state + // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should empty the buffer if the EmptySSBAction is dispatched without a payload', () => { diff --git a/src/app/shared/host-window.reducer.spec.ts b/src/app/shared/host-window.reducer.spec.ts index f580c0e1da..f8e5802e30 100644 --- a/src/app/shared/host-window.reducer.spec.ts +++ b/src/app/shared/host-window.reducer.spec.ts @@ -44,6 +44,10 @@ describe('hostWindowReducer', () => { const action = new HostWindowResizeAction(1024, 768); hostWindowReducer(state, action); + + // no expect required, deepFreeze will ensure an exception is thrown if the state + // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); }); diff --git a/src/app/shared/menu/menu.reducer.spec.ts b/src/app/shared/menu/menu.reducer.spec.ts index 2865e887fc..58b1251bb6 100644 --- a/src/app/shared/menu/menu.reducer.spec.ts +++ b/src/app/shared/menu/menu.reducer.spec.ts @@ -180,6 +180,7 @@ describe('menusReducer', () => { // no expect required, deepFreeze will ensure an exception is thrown if the state // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should set collapsed to false for the correct menu in response to the EXPAND_MENU action', () => { @@ -201,6 +202,7 @@ describe('menusReducer', () => { // no expect required, deepFreeze will ensure an exception is thrown if the state // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should set collapsed to false for the correct menu in response to the TOGGLE_MENU action when collapsed is true', () => { @@ -231,6 +233,7 @@ describe('menusReducer', () => { // no expect required, deepFreeze will ensure an exception is thrown if the state // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should set previewCollapsed to true for the correct menu in response to the COLLAPSE_MENU_PREVIEW action', () => { @@ -252,6 +255,7 @@ describe('menusReducer', () => { // no expect required, deepFreeze will ensure an exception is thrown if the state // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should set previewCollapsed to false for the correct menu in response to the EXPAND_MENU_PREVIEW action', () => { @@ -273,6 +277,7 @@ describe('menusReducer', () => { // no expect required, deepFreeze will ensure an exception is thrown if the state // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should set visible to true for the correct menu in response to the SHOW_MENU action', () => { @@ -294,6 +299,7 @@ describe('menusReducer', () => { // no expect required, deepFreeze will ensure an exception is thrown if the state // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should set previewCollapsed to false for the correct menu in response to the HIDE_MENU action', () => { @@ -315,6 +321,7 @@ describe('menusReducer', () => { // no expect required, deepFreeze will ensure an exception is thrown if the state // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should set add a new section for the correct menu in response to the ADD_SECTION action', () => { @@ -347,6 +354,7 @@ describe('menusReducer', () => { // no expect required, deepFreeze will ensure an exception is thrown if the state // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should remove a section for the correct menu in response to the REMOVE_SECTION action', () => { @@ -383,6 +391,10 @@ describe('menusReducer', () => { const action = new ActivateMenuSectionAction(menuID, topSectionID); menusReducer(state, action); + + // no expect required, deepFreeze will ensure an exception is thrown if the state + // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should set active to false for the correct menu section in response to the DEACTIVATE_SECTION action', () => { @@ -401,6 +413,10 @@ describe('menusReducer', () => { const action = new DeactivateMenuSectionAction(menuID, topSectionID); menusReducer(state, action); + + // no expect required, deepFreeze will ensure an exception is thrown if the state + // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should set active to false for the correct menu in response to the TOGGLE_ACTIVE_SECTION action when active is true', () => { @@ -430,6 +446,7 @@ describe('menusReducer', () => { // no expect required, deepFreeze will ensure an exception is thrown if the state // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should set visible to true for the correct menu section in response to the SHOW_SECTION action', () => { @@ -448,6 +465,10 @@ describe('menusReducer', () => { const action = new ShowMenuSectionAction(menuID, topSectionID); menusReducer(state, action); + + // no expect required, deepFreeze will ensure an exception is thrown if the state + // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should set visible to false for the correct menu section in response to the HIDE_SECTION action', () => { @@ -466,5 +487,9 @@ describe('menusReducer', () => { const action = new HideMenuSectionAction(menuID, topSectionID); menusReducer(state, action); + + // no expect required, deepFreeze will ensure an exception is thrown if the state + // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); }); diff --git a/src/app/shared/search/search-filters/search-filter/search-filter.reducer.spec.ts b/src/app/shared/search/search-filters/search-filter/search-filter.reducer.spec.ts index aa64589d2e..e94f175a8a 100644 --- a/src/app/shared/search/search-filters/search-filter/search-filter.reducer.spec.ts +++ b/src/app/shared/search/search-filters/search-filter/search-filter.reducer.spec.ts @@ -60,6 +60,7 @@ describe('filterReducer', () => { // no expect required, deepFreeze will ensure an exception is thrown if the state // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should set filterCollapsed to false in response to the EXPAND action', () => { @@ -78,6 +79,10 @@ describe('filterReducer', () => { const action = new SearchFilterExpandAction(filterName1); filterReducer(state, action); + + // no expect required, deepFreeze will ensure an exception is thrown if the state + // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should flip the value of filterCollapsed in response to the TOGGLE action', () => { @@ -99,6 +104,10 @@ describe('filterReducer', () => { const action = new SearchFilterToggleAction(filterName1); filterReducer(state, action); + + // no expect required, deepFreeze will ensure an exception is thrown if the state + // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should set filterCollapsed to true in response to the INITIALIZE action with isOpenByDefault to false when no state has been set for this filter', () => { diff --git a/src/app/shared/sidebar/sidebar.reducer.spec.ts b/src/app/shared/sidebar/sidebar.reducer.spec.ts index 76962f60c1..ffb3dbaabc 100644 --- a/src/app/shared/sidebar/sidebar.reducer.spec.ts +++ b/src/app/shared/sidebar/sidebar.reducer.spec.ts @@ -47,6 +47,7 @@ describe('sidebarReducer', () => { // no expect required, deepFreeze will ensure an exception is thrown if the state // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should set sidebarCollapsed to false in response to the EXPAND action', () => { @@ -63,6 +64,10 @@ describe('sidebarReducer', () => { const action = new SidebarExpandAction(); sidebarReducer(state, action); + + // no expect required, deepFreeze will ensure an exception is thrown if the state + // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should flip the value of sidebarCollapsed in response to the TOGGLE action', () => { @@ -82,6 +87,10 @@ describe('sidebarReducer', () => { const action = new SidebarToggleAction(); sidebarReducer(state, action); + + // no expect required, deepFreeze will ensure an exception is thrown if the state + // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); }); diff --git a/src/app/shared/truncatable/truncatable.reducer.spec.ts b/src/app/shared/truncatable/truncatable.reducer.spec.ts index 9866f382f7..a4628c309e 100644 --- a/src/app/shared/truncatable/truncatable.reducer.spec.ts +++ b/src/app/shared/truncatable/truncatable.reducer.spec.ts @@ -53,6 +53,7 @@ describe('truncatableReducer', () => { // no expect required, deepFreeze will ensure an exception is thrown if the state // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should set filterCollapsed to false in response to the EXPAND action', () => { @@ -71,6 +72,10 @@ describe('truncatableReducer', () => { const action = new TruncatableExpandAction(id1); truncatableReducer(state, action); + + // no expect required, deepFreeze will ensure an exception is thrown if the state + // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); it('should flip the value of filterCollapsed in response to the TOGGLE action', () => { @@ -92,5 +97,9 @@ describe('truncatableReducer', () => { const action = new TruncatableToggleAction(id2); truncatableReducer(state, action); + + // no expect required, deepFreeze will ensure an exception is thrown if the state + // is mutated, and any uncaught exception will cause the test to fail + expect().nothing(); }); });