Skip to content

Commit ecc65e3

Browse files
committed
Fixed tests
1 parent 275ec27 commit ecc65e3

13 files changed

+34
-22
lines changed

test/__snapshots__/index.spec.ts.snap

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,11 @@ export type OpenAPIConfig = {
210210
VERSION: string;
211211
WITH_CREDENTIALS: boolean;
212212
CREDENTIALS: 'include' | 'omit' | 'same-origin';
213-
TOKEN?: string | Resolver<string>;
214-
USERNAME?: string | Resolver<string>;
215-
PASSWORD?: string | Resolver<string>;
216-
HEADERS?: Headers | Resolver<Headers>;
217-
ENCODE_PATH?: (path: string) => string;
213+
TOKEN?: string | Resolver<string> | undefined;
214+
USERNAME?: string | Resolver<string> | undefined;
215+
PASSWORD?: string | Resolver<string> | undefined;
216+
HEADERS?: Headers | Resolver<Headers> | undefined;
217+
ENCODE_PATH?: ((path: string) => string) | undefined;
218218
};
219219

220220
export const OpenAPI: OpenAPIConfig = {
@@ -3317,11 +3317,11 @@ export type OpenAPIConfig = {
33173317
VERSION: string;
33183318
WITH_CREDENTIALS: boolean;
33193319
CREDENTIALS: 'include' | 'omit' | 'same-origin';
3320-
TOKEN?: string | Resolver<string>;
3321-
USERNAME?: string | Resolver<string>;
3322-
PASSWORD?: string | Resolver<string>;
3323-
HEADERS?: Headers | Resolver<Headers>;
3324-
ENCODE_PATH?: (path: string) => string;
3320+
TOKEN?: string | Resolver<string> | undefined;
3321+
USERNAME?: string | Resolver<string> | undefined;
3322+
PASSWORD?: string | Resolver<string> | undefined;
3323+
HEADERS?: Headers | Resolver<Headers> | undefined;
3324+
ENCODE_PATH?: ((path: string) => string) | undefined;
33253325
};
33263326

33273327
export const OpenAPI: OpenAPIConfig = {

test/e2e/client.angular.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ describe('client.angular', () => {
143143
expect(error).toBe(
144144
JSON.stringify({
145145
name: 'ApiError',
146-
message: 'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
146+
message:
147+
'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
147148
url: 'http://localhost:3000/base/api/v1.0/error?status=409',
148149
status: 409,
149150
statusText: 'Conflict',

test/e2e/client.axios.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ describe('client.axios', () => {
136136
expect(error).toBe(
137137
JSON.stringify({
138138
name: 'ApiError',
139-
message: 'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
139+
message:
140+
'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
140141
url: 'http://localhost:3000/base/api/v1.0/error?status=409',
141142
status: 409,
142143
statusText: 'Conflict',

test/e2e/client.babel.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ describe('client.babel', () => {
161161
expect(error).toBe(
162162
JSON.stringify({
163163
name: 'ApiError',
164-
message: 'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
164+
message:
165+
'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
165166
url: 'http://localhost:3000/base/api/v1.0/error?status=409',
166167
status: 409,
167168
statusText: 'Conflict',

test/e2e/client.fetch.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ describe('client.fetch', () => {
156156
expect(error).toBe(
157157
JSON.stringify({
158158
name: 'ApiError',
159-
message: 'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
159+
message:
160+
'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
160161
url: 'http://localhost:3000/base/api/v1.0/error?status=409',
161162
status: 409,
162163
statusText: 'Conflict',

test/e2e/client.node.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ describe('client.node', () => {
136136
expect(error).toBe(
137137
JSON.stringify({
138138
name: 'ApiError',
139-
message: 'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
139+
message:
140+
'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
140141
url: 'http://localhost:3000/base/api/v1.0/error?status=409',
141142
status: 409,
142143
statusText: 'Conflict',

test/e2e/client.xhr.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ describe('client.xhr', () => {
155155
expect(error).toBe(
156156
JSON.stringify({
157157
name: 'ApiError',
158-
message: 'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
158+
message:
159+
'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
159160
url: 'http://localhost:3000/base/api/v1.0/error?status=409',
160161
status: 409,
161162
statusText: 'Conflict',

test/e2e/v3.angular.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ describe('v3.angular', () => {
144144
expect(error).toBe(
145145
JSON.stringify({
146146
name: 'ApiError',
147-
message: 'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
147+
message:
148+
'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
148149
url: 'http://localhost:3000/base/api/v1.0/error?status=409',
149150
status: 409,
150151
statusText: 'Conflict',

test/e2e/v3.axios.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ describe('v3.axios', () => {
127127
expect(error).toBe(
128128
JSON.stringify({
129129
name: 'ApiError',
130-
message: 'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
130+
message:
131+
'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
131132
url: 'http://localhost:3000/base/api/v1.0/error?status=409',
132133
status: 409,
133134
statusText: 'Conflict',

test/e2e/v3.babel.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ describe('v3.babel', () => {
153153
expect(error).toBe(
154154
JSON.stringify({
155155
name: 'ApiError',
156-
message: 'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
156+
message:
157+
'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
157158
url: 'http://localhost:3000/base/api/v1.0/error?status=409',
158159
status: 409,
159160
statusText: 'Conflict',

0 commit comments

Comments
 (0)