@@ -30,24 +30,6 @@ test('v4 with pre-aborted signal', async () => {
3030 assert . equal ( await isOnline ( { signal : controller . signal } ) , false ) ;
3131} ) ;
3232
33- test ( 'v4 with abort signal after delay' , async ( ) => {
34- const controller = new AbortController ( ) ;
35-
36- // Start the promise with a longer timeout
37- const promise = isOnline ( { signal : controller . signal , timeout : 10_000 } ) ;
38-
39- // Use a small delay to ensure the promise starts processing
40- // but abort before network checks can complete
41- await new Promise ( resolve => {
42- setTimeout ( resolve , 5 ) ;
43- } ) ;
44- controller . abort ( ) ;
45-
46- // The result should be false because we aborted
47- const result = await promise ;
48- assert . equal ( result , false ) ;
49- } ) ;
50-
5133test ( 'invalid ipVersion throws error' , async ( ) => {
5234 await assert . rejects ( isOnline ( { ipVersion : 5 } ) , { message : '`ipVersion` must be 4 or 6' } ) ;
5335} ) ;
@@ -159,24 +141,6 @@ if (!process.env.CI) {
159141 controller . abort ( ) ;
160142 assert . equal ( await isOnline ( { ipVersion : 6 , signal : controller . signal } ) , false ) ;
161143 } ) ;
162-
163- test ( 'v6 with abort signal after delay' , async ( ) => {
164- const controller = new AbortController ( ) ;
165-
166- // Start the promise with a longer timeout
167- const promise = isOnline ( { ipVersion : 6 , signal : controller . signal , timeout : 10_000 } ) ;
168-
169- // Use a small delay to ensure the promise starts processing
170- // but abort before network checks can complete
171- await new Promise ( resolve => {
172- setTimeout ( resolve , 5 ) ;
173- } ) ;
174- controller . abort ( ) ;
175-
176- // The result should be false because we aborted
177- const result = await promise ;
178- assert . equal ( result , false ) ;
179- } ) ;
180144}
181145
182146test ( 'diagnostics channel publishes failure events' , async ( ) => {
0 commit comments