Fixed tests

This commit is contained in:
Ferdi Koomen 2023-04-11 10:02:13 +02:00
parent 275ec27650
commit ecc65e3da0
13 changed files with 34 additions and 22 deletions

View File

@ -210,11 +210,11 @@ export type OpenAPIConfig = {
VERSION: string;
WITH_CREDENTIALS: boolean;
CREDENTIALS: 'include' | 'omit' | 'same-origin';
TOKEN?: string | Resolver<string>;
USERNAME?: string | Resolver<string>;
PASSWORD?: string | Resolver<string>;
HEADERS?: Headers | Resolver<Headers>;
ENCODE_PATH?: (path: string) => string;
TOKEN?: string | Resolver<string> | undefined;
USERNAME?: string | Resolver<string> | undefined;
PASSWORD?: string | Resolver<string> | undefined;
HEADERS?: Headers | Resolver<Headers> | undefined;
ENCODE_PATH?: ((path: string) => string) | undefined;
};
export const OpenAPI: OpenAPIConfig = {
@ -3317,11 +3317,11 @@ export type OpenAPIConfig = {
VERSION: string;
WITH_CREDENTIALS: boolean;
CREDENTIALS: 'include' | 'omit' | 'same-origin';
TOKEN?: string | Resolver<string>;
USERNAME?: string | Resolver<string>;
PASSWORD?: string | Resolver<string>;
HEADERS?: Headers | Resolver<Headers>;
ENCODE_PATH?: (path: string) => string;
TOKEN?: string | Resolver<string> | undefined;
USERNAME?: string | Resolver<string> | undefined;
PASSWORD?: string | Resolver<string> | undefined;
HEADERS?: Headers | Resolver<Headers> | undefined;
ENCODE_PATH?: ((path: string) => string) | undefined;
};
export const OpenAPI: OpenAPIConfig = {

View File

@ -143,7 +143,8 @@ describe('client.angular', () => {
expect(error).toBe(
JSON.stringify({
name: 'ApiError',
message: 'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
message:
'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
url: 'http://localhost:3000/base/api/v1.0/error?status=409',
status: 409,
statusText: 'Conflict',

View File

@ -136,7 +136,8 @@ describe('client.axios', () => {
expect(error).toBe(
JSON.stringify({
name: 'ApiError',
message: 'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
message:
'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
url: 'http://localhost:3000/base/api/v1.0/error?status=409',
status: 409,
statusText: 'Conflict',

View File

@ -161,7 +161,8 @@ describe('client.babel', () => {
expect(error).toBe(
JSON.stringify({
name: 'ApiError',
message: 'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
message:
'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
url: 'http://localhost:3000/base/api/v1.0/error?status=409',
status: 409,
statusText: 'Conflict',

View File

@ -156,7 +156,8 @@ describe('client.fetch', () => {
expect(error).toBe(
JSON.stringify({
name: 'ApiError',
message: 'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
message:
'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
url: 'http://localhost:3000/base/api/v1.0/error?status=409',
status: 409,
statusText: 'Conflict',

View File

@ -136,7 +136,8 @@ describe('client.node', () => {
expect(error).toBe(
JSON.stringify({
name: 'ApiError',
message: 'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
message:
'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
url: 'http://localhost:3000/base/api/v1.0/error?status=409',
status: 409,
statusText: 'Conflict',

View File

@ -155,7 +155,8 @@ describe('client.xhr', () => {
expect(error).toBe(
JSON.stringify({
name: 'ApiError',
message: 'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
message:
'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
url: 'http://localhost:3000/base/api/v1.0/error?status=409',
status: 409,
statusText: 'Conflict',

View File

@ -144,7 +144,8 @@ describe('v3.angular', () => {
expect(error).toBe(
JSON.stringify({
name: 'ApiError',
message: 'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
message:
'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
url: 'http://localhost:3000/base/api/v1.0/error?status=409',
status: 409,
statusText: 'Conflict',

View File

@ -127,7 +127,8 @@ describe('v3.axios', () => {
expect(error).toBe(
JSON.stringify({
name: 'ApiError',
message: 'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
message:
'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
url: 'http://localhost:3000/base/api/v1.0/error?status=409',
status: 409,
statusText: 'Conflict',

View File

@ -153,7 +153,8 @@ describe('v3.babel', () => {
expect(error).toBe(
JSON.stringify({
name: 'ApiError',
message: 'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
message:
'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
url: 'http://localhost:3000/base/api/v1.0/error?status=409',
status: 409,
statusText: 'Conflict',

View File

@ -147,7 +147,8 @@ describe('v3.fetch', () => {
expect(error).toBe(
JSON.stringify({
name: 'ApiError',
message: 'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
message:
'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
url: 'http://localhost:3000/base/api/v1.0/error?status=409',
status: 409,
statusText: 'Conflict',

View File

@ -127,7 +127,8 @@ describe('v3.node', () => {
expect(error).toBe(
JSON.stringify({
name: 'ApiError',
message: 'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
message:
'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
url: 'http://localhost:3000/base/api/v1.0/error?status=409',
status: 409,
statusText: 'Conflict',

View File

@ -146,7 +146,8 @@ describe('v3.xhr', () => {
expect(error).toBe(
JSON.stringify({
name: 'ApiError',
message: 'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
message:
'Generic Error: status: 409; status text: Conflict; body: {\n "status": 409,\n "message": "hello world"\n}',
url: 'http://localhost:3000/base/api/v1.0/error?status=409',
status: 409,
statusText: 'Conflict',