@@ -39,14 +39,18 @@ describe('request', () => {
39
39
one : 'two'
40
40
} ) . then ( function ( response : Response ) {
41
41
expect ( response . status ) . toEqual ( 200 ) ;
42
- expect ( JSON . parse ( response . body as string ) ) . toEqual ( {
42
+
43
+ const body = JSON . parse ( response . body as string ) ;
44
+ // as of node 19 this became uncidi, I don't want to reject old versions for just this one test issue
45
+ delete body . headers [ 'user-agent' ] ;
46
+
47
+ expect ( body ) . toEqual ( {
43
48
url : '/' ,
44
49
method : 'GET' ,
45
50
body : '' ,
46
51
headers : {
47
52
one : 'two' ,
48
53
accept : '*/*' ,
49
- 'user-agent' : 'node' ,
50
54
'accept-encoding' : 'gzip, deflate' ,
51
55
'accept-language' : '*' ,
52
56
'sec-fetch-mode' : 'cors' ,
@@ -69,15 +73,19 @@ describe('request', () => {
69
73
one : [ 'two' , 'three' ]
70
74
} ) . then ( function ( response : Response ) {
71
75
expect ( response . status ) . toEqual ( 200 ) ;
72
- expect ( JSON . parse ( response . body as string ) ) . toEqual ( {
76
+
77
+ const body = JSON . parse ( response . body as string ) ;
78
+ // as of node 19 this became uncidi, I don't want to reject old versions for just this one test issue
79
+ delete body . headers [ 'user-agent' ] ;
80
+
81
+ expect ( body ) . toEqual ( {
73
82
url : '/' ,
74
83
method : 'GET' ,
75
84
body : '' ,
76
85
headers : {
77
86
// node fetch doesn't seem to retain dupe arrays, this is what we get.
78
87
one : 'two, three' ,
79
88
accept : '*/*' ,
80
- 'user-agent' : 'node' ,
81
89
'accept-encoding' : 'gzip, deflate' ,
82
90
'accept-language' : '*' ,
83
91
connection : 'keep-alive' ,
@@ -107,7 +115,10 @@ describe('request', () => {
107
115
} ) . then ( function ( response : Response ) {
108
116
expect ( response . status ) . toEqual ( 200 ) ;
109
117
110
- expect ( JSON . parse ( response . body as string ) ) . toMatchObject ( {
118
+ const body = JSON . parse ( response . body as string ) ;
119
+ // as of node 19 this became uncidi, I don't want to reject old versions for just this one test issue
120
+ delete body . headers [ 'user-agent' ] ;
121
+ expect ( body ) . toMatchObject ( {
111
122
url : '/' ,
112
123
method : 'POST' ,
113
124
body : '{"yeah": "what"}' ,
@@ -116,7 +127,6 @@ describe('request', () => {
116
127
'content-type' : 'text/plain;charset=UTF-8' ,
117
128
accept : '*/*' ,
118
129
'content-length' : '16' ,
119
- 'user-agent' : 'node' ,
120
130
'accept-encoding' : 'gzip, deflate' ,
121
131
connection : 'keep-alive' ,
122
132
host : `127.0.0.1:${ port } ` ,
0 commit comments