Skip to content

Commit

Permalink
Merge pull request #3800 from Kalibryyy/master
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson authored Oct 14, 2023
2 parents e6d8600 + 7dc2bce commit 9d804fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/toolkit/src/mapBuilders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export function executeReducerBuilderCallback<S>(
}
if (type in actionsMap) {
throw new Error(
'`builder.addCase` cannot be called with two reducers for the same action type'
`\`builder.addCase\` cannot be called with two reducers for the same action type '${type}'`
)
}
actionsMap[type] = reducer
Expand Down
4 changes: 2 additions & 2 deletions packages/toolkit/src/tests/createReducer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ describe('createReducer', () => {
.addCase(decrement, (state, action) => state - action.payload)
)
).toThrowErrorMatchingInlineSnapshot(
'"`builder.addCase` cannot be called with two reducers for the same action type"'
'"`builder.addCase` cannot be called with two reducers for the same action type \'increment\'"'
)
expect(() =>
createReducer(0, (builder) =>
Expand All @@ -470,7 +470,7 @@ describe('createReducer', () => {
.addCase(decrement, (state, action) => state - action.payload)
)
).toThrowErrorMatchingInlineSnapshot(
'"`builder.addCase` cannot be called with two reducers for the same action type"'
'"`builder.addCase` cannot be called with two reducers for the same action type \'increment\'"'
)
})

Expand Down

0 comments on commit 9d804fd

Please sign in to comment.