Skip to content

Commit

Permalink
Fix AbortController test
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed Mar 5, 2020
1 parent 9a61fb8 commit 47dc369
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/createAsyncThunk.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ import {
getLog
} from 'console-testing-library/pure'

declare global {
interface Window {
AbortController: AbortController
}
}

describe('createAsyncThunk', () => {
it('creates the action types', () => {
const thunkActionCreator = createAsyncThunk('testType', async () => 42)
Expand Down Expand Up @@ -416,7 +422,7 @@ describe('createAsyncThunk with abortController', () => {
})

describe('behaviour with missing AbortController', () => {
let keepAbortController: typeof AbortController
let keepAbortController: typeof window['AbortController']
let freshlyLoadedModule: typeof import('./createAsyncThunk')
let restore: () => void
let nodeEnv: string
Expand Down

0 comments on commit 47dc369

Please sign in to comment.