We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f1ac68 commit 7aa3933Copy full SHA for 7aa3933
packages/toolkit/src/tests/createSlice.test.ts
@@ -738,6 +738,15 @@ describe('createSlice', () => {
738
},
739
}
740
test('allows passing custom reducer creators, which can add actions and case reducers', () => {
741
+ expect(() =>
742
+ createSlice({
743
+ name: 'loader',
744
+ initialState: {} as Partial<Record<string, true>>,
745
+ reducers: () => ({
746
+ addLoader: loaderCreator.create({}),
747
+ }),
748
749
+ ).toThrowErrorMatchingInlineSnapshot(`[Error: Unsupported reducer type: Symbol(loaderCreatorType)]`)
750
const createAppSlice = buildCreateSlice({
751
creators: { loader: loaderCreator },
752
})
0 commit comments