File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,9 @@ test('ensures the given callback is a function', () => {
74
74
)
75
75
} )
76
76
77
+ const testAbortController =
78
+ typeof AbortController === 'undefined' ? test . skip : test
79
+
77
80
describe ( 'using fake modern timers' , ( ) => {
78
81
beforeEach ( ( ) => {
79
82
jest . useFakeTimers ( 'modern' )
@@ -220,7 +223,7 @@ describe('using fake modern timers', () => {
220
223
` )
221
224
} )
222
225
223
- test ( 'can be aborted with an AbortSignal' , async ( ) => {
226
+ testAbortController ( 'can be aborted with an AbortSignal' , async ( ) => {
224
227
const callback = jest . fn ( ( ) => {
225
228
throw new Error ( 'not done' )
226
229
} )
@@ -238,7 +241,7 @@ describe('using fake modern timers', () => {
238
241
expect ( callback ) . toHaveBeenCalledTimes ( 2 )
239
242
} )
240
243
241
- test ( 'does not even ping if the signal is already aborted' , async ( ) => {
244
+ testAbortController ( 'does not even ping if the signal is already aborted' , async ( ) => {
242
245
const callback = jest . fn ( ( ) => {
243
246
throw new Error ( 'not done' )
244
247
} )
You can’t perform that action at this time.
0 commit comments