File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 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', () => {
7474 )
7575} )
7676
77+ const testAbortController =
78+ typeof AbortController === 'undefined' ? test . skip : test
79+
7780describe ( 'using fake modern timers' , ( ) => {
7881 beforeEach ( ( ) => {
7982 jest . useFakeTimers ( 'modern' )
@@ -220,7 +223,7 @@ describe('using fake modern timers', () => {
220223 ` )
221224 } )
222225
223- test ( 'can be aborted with an AbortSignal' , async ( ) => {
226+ testAbortController ( 'can be aborted with an AbortSignal' , async ( ) => {
224227 const callback = jest . fn ( ( ) => {
225228 throw new Error ( 'not done' )
226229 } )
@@ -238,7 +241,7 @@ describe('using fake modern timers', () => {
238241 expect ( callback ) . toHaveBeenCalledTimes ( 2 )
239242 } )
240243
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 ( ) => {
242245 const callback = jest . fn ( ( ) => {
243246 throw new Error ( 'not done' )
244247 } )
You can’t perform that action at this time.
0 commit comments