Skip to content

Commit

Permalink
Update error message syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
chawes13 committed Jul 2, 2023
1 parent bdb60d8 commit 5c82a28
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(
'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'
)
}
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(
`"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"'
)
expect(() =>
createReducer(0, (builder) =>
Expand All @@ -470,7 +470,7 @@ describe('createReducer', () => {
.addCase(decrement, (state, action) => state - action.payload)
)
).toThrowErrorMatchingInlineSnapshot(
`"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"'
)
})

Expand Down

0 comments on commit 5c82a28

Please sign in to comment.