Skip to content

Commit e92c7db

Browse files
author
ben.durrant
committed
fix tests
1 parent 37ab272 commit e92c7db

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/toolkit/src/tests/combineSlices.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { createReducer } from '../createReducer'
22
import { createAction } from '../createAction'
33
import { createSlice } from '../createSlice'
4-
import type { WithApi, WithSlice } from '../combineSlices'
4+
import type { WithSlice } from '../combineSlices'
55
import { combineSlices } from '../combineSlices'
66
import { expectType } from './helpers'
77
import type { CombinedState } from '../query/core/apiState'
@@ -84,19 +84,19 @@ describe('combineSlices', () => {
8484
combineSlices(stringSlice).withLazyLoadedSlices<{ boolean: boolean }>()
8585

8686
combinedReducer.inject({
87-
name: 'boolean' as const,
87+
reducerPath: 'boolean' as const,
8888
reducer: booleanReducer,
8989
})
9090

9191
combinedReducer.inject({
92-
name: 'boolean' as const,
92+
reducerPath: 'boolean' as const,
9393
reducer: booleanReducer,
9494
})
9595

9696
expect(consoleSpy).not.toHaveBeenCalled()
9797

9898
combinedReducer.inject({
99-
name: 'boolean' as const,
99+
reducerPath: 'boolean' as const,
100100
// @ts-expect-error wrong reducer
101101
reducer: stringSlice.reducer,
102102
})
@@ -110,13 +110,13 @@ describe('combineSlices', () => {
110110
const consoleSpy = vi.spyOn(console, 'error').mockImplementation(() => {})
111111
const combinedReducer = combineSlices(stringSlice).withLazyLoadedSlices<
112112
WithSlice<typeof numberSlice> &
113-
WithApi<typeof api> & { boolean: boolean }
113+
WithSlice<typeof api> & { boolean: boolean }
114114
>()
115115

116116
combinedReducer.inject(numberSlice)
117117

118118
combinedReducer.inject(
119-
{ name: 'number' as const, reducer: () => 0 },
119+
{ reducerPath: 'number' as const, reducer: () => 0 },
120120
{ overrideExisting: true }
121121
)
122122

@@ -130,7 +130,7 @@ describe('combineSlices', () => {
130130
const uninjectedState = combinedReducer(undefined, dummyAction())
131131

132132
const injectedReducer = combinedReducer.inject({
133-
name: 'boolean' as const,
133+
reducerPath: 'boolean' as const,
134134
reducer: booleanReducer,
135135
})
136136

0 commit comments

Comments
 (0)