@@ -4,36 +4,14 @@ import { createDeferred } from '../../testing-utils/create-deferred';
4
4
import { createLogger , createSchema , createYoga , FetchAPI } from '../src/index' ;
5
5
import { useExecutionCancellation } from '../src/plugins/use-execution-cancellation' ;
6
6
7
- const variants : Array < [ name : string , fetchAPI : undefined | FetchAPI ] > = [
8
- [ 'Ponyfilled WhatWG Fetch' , undefined ] ,
9
- ] ;
7
+ const variants : Array < [ name : string , fetchAPI : undefined | FetchAPI ] > = [ [ 'Ponyfill' , undefined ] ] ;
10
8
11
- const [ major ] = globalThis ?. process ?. versions ?. node . split ( '.' ) ?? [ ] ;
12
-
13
- if ( major === '21' && process . env . LEAKS_TEST !== 'true' ) {
9
+ if ( ! process . env . LEAK_TESTS ) {
14
10
variants . push ( [
15
- 'Node.js 21' ,
16
- {
17
- fetch : globalThis . fetch ,
18
- Blob : globalThis . Blob ,
19
- btoa : globalThis . btoa ,
20
- FormData : globalThis . FormData ,
21
- Headers : globalThis . Headers ,
22
- Request : globalThis . Request ,
23
- crypto : globalThis . crypto ,
24
- File : globalThis . File ,
25
- ReadableStream : globalThis . ReadableStream ,
26
- Response : globalThis . Response ,
27
- TextDecoder : globalThis . TextDecoder ,
28
- TextEncoder : globalThis . TextEncoder ,
29
- URL : globalThis . URL ,
30
- TransformStream : globalThis . TransformStream ,
31
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
32
- // @ts -ignore: URLPattern is not available in some environments
33
- URLPattern : globalThis . URLPattern ,
34
- URLSearchParams : globalThis . URLSearchParams ,
35
- WritableStream : globalThis . WritableStream ,
36
- } ,
11
+ 'Native' ,
12
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
13
+ // @ts -ignore - URLPattern is not available in types
14
+ globalThis ,
37
15
] ) ;
38
16
}
39
17
0 commit comments