Skip to content

Commit 36a852f

Browse files
frazarsmorimoto
authored andcommitted
Update all unit tests snapshots
1 parent 6923be5 commit 36a852f

File tree

27 files changed

+871
-327
lines changed

27 files changed

+871
-327
lines changed

tests/__snapshots__/extended.test.ts.snap

Lines changed: 336 additions & 126 deletions
Large diffs are not rendered by default.

tests/__snapshots__/simple.test.ts.snap

Lines changed: 336 additions & 126 deletions
Large diffs are not rendered by default.

tests/spec/another-query-params/__snapshots__/basic.test.ts.snap

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,12 @@ export class HttpClient<SecurityDataType = unknown> {
162162
input !== null && typeof input !== "string"
163163
? JSON.stringify(input)
164164
: input,
165-
[ContentType.FormData]: (input: any) =>
166-
Object.keys(input || {}).reduce((formData, key) => {
165+
[ContentType.FormData]: (input: any) => {
166+
if (input instanceof FormData) {
167+
return input;
168+
}
169+
170+
return Object.keys(input || {}).reduce((formData, key) => {
167171
const property = input[key];
168172
formData.append(
169173
key,
@@ -174,7 +178,8 @@ export class HttpClient<SecurityDataType = unknown> {
174178
: \`\${property}\`,
175179
);
176180
return formData;
177-
}, new FormData()),
181+
}, new FormData());
182+
},
178183
[ContentType.UrlEncoded]: (input: any) => this.toQueryString(input),
179184
};
180185

tests/spec/custom-extensions/__snapshots__/basic.test.ts.snap

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,12 @@ export class HttpClient<SecurityDataType = unknown> {
134134
input !== null && typeof input !== "string"
135135
? JSON.stringify(input)
136136
: input,
137-
[ContentType.FormData]: (input: any) =>
138-
Object.keys(input || {}).reduce((formData, key) => {
137+
[ContentType.FormData]: (input: any) => {
138+
if (input instanceof FormData) {
139+
return input;
140+
}
141+
142+
return Object.keys(input || {}).reduce((formData, key) => {
139143
const property = input[key];
140144
formData.append(
141145
key,
@@ -146,7 +150,8 @@ export class HttpClient<SecurityDataType = unknown> {
146150
: \`\${property}\`,
147151
);
148152
return formData;
149-
}, new FormData()),
153+
}, new FormData());
154+
},
150155
[ContentType.UrlEncoded]: (input: any) => this.toQueryString(input),
151156
};
152157

tests/spec/defaultAsSuccess/__snapshots__/basic.test.ts.snap

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,12 @@ export class HttpClient<SecurityDataType = unknown> {
174174
input !== null && typeof input !== "string"
175175
? JSON.stringify(input)
176176
: input,
177-
[ContentType.FormData]: (input: any) =>
178-
Object.keys(input || {}).reduce((formData, key) => {
177+
[ContentType.FormData]: (input: any) => {
178+
if (input instanceof FormData) {
179+
return input;
180+
}
181+
182+
return Object.keys(input || {}).reduce((formData, key) => {
179183
const property = input[key];
180184
formData.append(
181185
key,
@@ -186,7 +190,8 @@ export class HttpClient<SecurityDataType = unknown> {
186190
: \`\${property}\`,
187191
);
188192
return formData;
189-
}, new FormData()),
193+
}, new FormData());
194+
},
190195
[ContentType.UrlEncoded]: (input: any) => this.toQueryString(input),
191196
};
192197

tests/spec/defaultResponse/__snapshots__/basic.test.ts.snap

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,12 @@ export class HttpClient<SecurityDataType = unknown> {
134134
input !== null && typeof input !== "string"
135135
? JSON.stringify(input)
136136
: input,
137-
[ContentType.FormData]: (input: any) =>
138-
Object.keys(input || {}).reduce((formData, key) => {
137+
[ContentType.FormData]: (input: any) => {
138+
if (input instanceof FormData) {
139+
return input;
140+
}
141+
142+
return Object.keys(input || {}).reduce((formData, key) => {
139143
const property = input[key];
140144
formData.append(
141145
key,
@@ -146,7 +150,8 @@ export class HttpClient<SecurityDataType = unknown> {
146150
: \`\${property}\`,
147151
);
148152
return formData;
149-
}, new FormData()),
153+
}, new FormData());
154+
},
150155
[ContentType.UrlEncoded]: (input: any) => this.toQueryString(input),
151156
};
152157

tests/spec/deprecated/__snapshots__/basic.test.ts.snap

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,12 @@ export class HttpClient<SecurityDataType = unknown> {
134134
input !== null && typeof input !== "string"
135135
? JSON.stringify(input)
136136
: input,
137-
[ContentType.FormData]: (input: any) =>
138-
Object.keys(input || {}).reduce((formData, key) => {
137+
[ContentType.FormData]: (input: any) => {
138+
if (input instanceof FormData) {
139+
return input;
140+
}
141+
142+
return Object.keys(input || {}).reduce((formData, key) => {
139143
const property = input[key];
140144
formData.append(
141145
key,
@@ -146,7 +150,8 @@ export class HttpClient<SecurityDataType = unknown> {
146150
: \`\${property}\`,
147151
);
148152
return formData;
149-
}, new FormData()),
153+
}, new FormData());
154+
},
150155
[ContentType.UrlEncoded]: (input: any) => this.toQueryString(input),
151156
};
152157

tests/spec/dot-path-params/__snapshots__/basic.test.ts.snap

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,12 @@ export class HttpClient<SecurityDataType = unknown> {
136136
input !== null && typeof input !== "string"
137137
? JSON.stringify(input)
138138
: input,
139-
[ContentType.FormData]: (input: any) =>
140-
Object.keys(input || {}).reduce((formData, key) => {
139+
[ContentType.FormData]: (input: any) => {
140+
if (input instanceof FormData) {
141+
return input;
142+
}
143+
144+
return Object.keys(input || {}).reduce((formData, key) => {
141145
const property = input[key];
142146
formData.append(
143147
key,
@@ -148,7 +152,8 @@ export class HttpClient<SecurityDataType = unknown> {
148152
: \`\${property}\`,
149153
);
150154
return formData;
151-
}, new FormData()),
155+
}, new FormData());
156+
},
152157
[ContentType.UrlEncoded]: (input: any) => this.toQueryString(input),
153158
};
154159

tests/spec/enumNamesAsValues/__snapshots__/basic.test.ts.snap

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,12 @@ export class HttpClient<SecurityDataType = unknown> {
326326
input !== null && typeof input !== "string"
327327
? JSON.stringify(input)
328328
: input,
329-
[ContentType.FormData]: (input: any) =>
330-
Object.keys(input || {}).reduce((formData, key) => {
329+
[ContentType.FormData]: (input: any) => {
330+
if (input instanceof FormData) {
331+
return input;
332+
}
333+
334+
return Object.keys(input || {}).reduce((formData, key) => {
331335
const property = input[key];
332336
formData.append(
333337
key,
@@ -338,7 +342,8 @@ export class HttpClient<SecurityDataType = unknown> {
338342
: \`\${property}\`,
339343
);
340344
return formData;
341-
}, new FormData()),
345+
}, new FormData());
346+
},
342347
[ContentType.UrlEncoded]: (input: any) => this.toQueryString(input),
343348
};
344349

tests/spec/enumNotFirstInComponents/__snapshots__/basic.test.ts.snap

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,12 @@ export class HttpClient<SecurityDataType = unknown> {
164164
input !== null && typeof input !== "string"
165165
? JSON.stringify(input)
166166
: input,
167-
[ContentType.FormData]: (input: any) =>
168-
Object.keys(input || {}).reduce((formData, key) => {
167+
[ContentType.FormData]: (input: any) => {
168+
if (input instanceof FormData) {
169+
return input;
170+
}
171+
172+
return Object.keys(input || {}).reduce((formData, key) => {
169173
const property = input[key];
170174
formData.append(
171175
key,
@@ -176,7 +180,8 @@ export class HttpClient<SecurityDataType = unknown> {
176180
: \`\${property}\`,
177181
);
178182
return formData;
179-
}, new FormData()),
183+
}, new FormData());
184+
},
180185
[ContentType.UrlEncoded]: (input: any) => this.toQueryString(input),
181186
};
182187

0 commit comments

Comments
 (0)