Skip to content

Commit

Permalink
Simplify test
Browse files Browse the repository at this point in the history
  • Loading branch information
Georg Wicke-Arndt authored and markerikson committed Jan 28, 2023
1 parent f9049cc commit bcd0615
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -598,11 +598,6 @@ describe('serializableStateInvariantMiddleware', () => {
})

it('Should cache its results', () => {
const reducer: Reducer<[], AnyAction> = (state = [], action) => {
if (action.type === 'SET_STATE') return action.payload
return state
}

let numPlainChecks = 0
const countPlainChecks = (x: any) => {
numPlainChecks++
Expand All @@ -615,8 +610,9 @@ describe('serializableStateInvariantMiddleware', () => {
})

const store = configureStore({
reducer: {
testSlice: reducer,
reducer: (state = [], action) => {
if (action.type === 'SET_STATE') return action.payload
return state
},
middleware: [serializableStateInvariantMiddleware],
})
Expand Down

0 comments on commit bcd0615

Please sign in to comment.