Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
EskiMojo14 committed May 4, 2024
1 parent 0007885 commit 10fae1a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/toolkit/src/tests/createSlice.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ describe('createSlice', () => {
initialState: [] as any[],
reducers: (create) => ({
thunkReducers: create.asyncThunk(
function payloadCreator(arg, api) {
function payloadCreator(arg: string, api) {
return Promise.resolve('resolved payload')
},
{ pending, fulfilled, rejected, settled },
Expand Down Expand Up @@ -722,7 +722,7 @@ describe('createSlice', () => {
reducers: (create) => ({
thunkReducers: create.asyncThunk(
// payloadCreator isn't allowed to return never
function payloadCreator(arg, api): any {
function payloadCreator(arg: string, api): any {
throw new Error('')
},
{ pending, fulfilled, rejected, settled },
Expand Down Expand Up @@ -765,7 +765,7 @@ describe('createSlice', () => {
initialState: [] as any[],
reducers: (create) => ({
thunkReducers: create.asyncThunk(
function payloadCreator(arg, api) {
function payloadCreator(arg: string, api) {
return 'should not call this'
},
{
Expand Down Expand Up @@ -833,7 +833,6 @@ describe('createSlice', () => {
slice.actions.thunkReducers.rejected(
new Error('test'),
'fakeRequestId',
{},
),
),
).not.toThrow()
Expand Down

0 comments on commit 10fae1a

Please sign in to comment.