Skip to content

Commit 10fae1a

Browse files
committed
fix test
1 parent 0007885 commit 10fae1a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

+3-4
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ describe('createSlice', () => {
678678
initialState: [] as any[],
679679
reducers: (create) => ({
680680
thunkReducers: create.asyncThunk(
681-
function payloadCreator(arg, api) {
681+
function payloadCreator(arg: string, api) {
682682
return Promise.resolve('resolved payload')
683683
},
684684
{ pending, fulfilled, rejected, settled },
@@ -722,7 +722,7 @@ describe('createSlice', () => {
722722
reducers: (create) => ({
723723
thunkReducers: create.asyncThunk(
724724
// payloadCreator isn't allowed to return never
725-
function payloadCreator(arg, api): any {
725+
function payloadCreator(arg: string, api): any {
726726
throw new Error('')
727727
},
728728
{ pending, fulfilled, rejected, settled },
@@ -765,7 +765,7 @@ describe('createSlice', () => {
765765
initialState: [] as any[],
766766
reducers: (create) => ({
767767
thunkReducers: create.asyncThunk(
768-
function payloadCreator(arg, api) {
768+
function payloadCreator(arg: string, api) {
769769
return 'should not call this'
770770
},
771771
{
@@ -833,7 +833,6 @@ describe('createSlice', () => {
833833
slice.actions.thunkReducers.rejected(
834834
new Error('test'),
835835
'fakeRequestId',
836-
{},
837836
),
838837
),
839838
).not.toThrow()

0 commit comments

Comments
 (0)