Skip to content

Commit

Permalink
include withLazyLoadedSlices test
Browse files Browse the repository at this point in the history
  • Loading branch information
EskiMojo14 committed Feb 11, 2024
1 parent c25ad5f commit 8e00d85
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/toolkit/src/tests/combineSlices.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ describe('type tests', () => {
const rootReducer = combineSlices()

expectTypeOf(rootReducer(undefined, { type: '' })).toEqualTypeOf<{}>()

const declaredLazy =
combineSlices().withLazyLoadedSlices<WithSlice<typeof numberSlice>>()

expectTypeOf(declaredLazy(undefined, { type: '' })).toEqualTypeOf<{
number?: number
}>()
})

test('withLazyLoadedSlices adds partial to state', () => {
Expand Down

0 comments on commit 8e00d85

Please sign in to comment.