Fix how headers are handled in @hey-api/client-angular #3860
Annotations
10 errors
|
Run test coverage:
packages/openapi-ts-tests/main/test/clients.test.ts#L201
Error: Snapshot `@hey-api/client-angular > 'SDK with NodeNext tsconfig' 5` mismatched
- Expected
+ Received
@@ -184,11 +184,11 @@
export const setAuthParams = async (
options: Pick<RequestOptions, 'auth' | 'query'> & {
headers: HttpHeaders;
},
- security: Pick<Required<RequestOptions>, 'security'>['security']
+ security: Pick<Required<RequestOptions>, 'security'>['security'],
) => {
for (const auth of security) {
const token = await getAuthToken(auth, options.auth);
if (!token) {
@@ -209,13 +209,11 @@
break;
case 'header':
default:
options.headers = options.headers.set(name, token);
break;
- }
-
- return;
+ }
}
};
export const buildUrl: Client['buildUrl'] = (options) => {
const url = getUrl({
❯ test/clients.test.ts:201:11
❯ test/clients.test.ts:187:7
|
|
Run test coverage:
packages/openapi-ts-tests/main/test/clients.test.ts#L201
Error: Snapshot `@hey-api/client-angular > 'client with strict base URL' 4` mismatched
- Expected
+ Received
@@ -184,11 +184,11 @@
export const setAuthParams = async (
options: Pick<RequestOptions, 'auth' | 'query'> & {
headers: HttpHeaders;
},
- security: Pick<Required<RequestOptions>, 'security'>['security']
+ security: Pick<Required<RequestOptions>, 'security'>['security'],
) => {
for (const auth of security) {
const token = await getAuthToken(auth, options.auth);
if (!token) {
@@ -209,13 +209,11 @@
break;
case 'header':
default:
options.headers = options.headers.set(name, token);
break;
- }
-
- return;
+ }
}
};
export const buildUrl: Client['buildUrl'] = (options) => {
const url = getUrl({
❯ test/clients.test.ts:201:11
❯ test/clients.test.ts:187:7
|
|
Run test coverage:
packages/openapi-ts-tests/main/test/clients.test.ts#L201
Error: Snapshot `@hey-api/client-angular > 'client with custom string base URL' 5` mismatched
- Expected
+ Received
@@ -184,11 +184,11 @@
export const setAuthParams = async (
options: Pick<RequestOptions, 'auth' | 'query'> & {
headers: HttpHeaders;
},
- security: Pick<Required<RequestOptions>, 'security'>['security']
+ security: Pick<Required<RequestOptions>, 'security'>['security'],
) => {
for (const auth of security) {
const token = await getAuthToken(auth, options.auth);
if (!token) {
@@ -209,13 +209,11 @@
break;
case 'header':
default:
options.headers = options.headers.set(name, token);
break;
- }
-
- return;
+ }
}
};
export const buildUrl: Client['buildUrl'] = (options) => {
const url = getUrl({
❯ test/clients.test.ts:201:11
❯ test/clients.test.ts:187:7
|
|
Run test coverage:
packages/openapi-ts-tests/main/test/clients.test.ts#L201
Error: Snapshot `@hey-api/client-angular > 'client with numeric base URL' 4` mismatched
- Expected
+ Received
@@ -184,11 +184,11 @@
export const setAuthParams = async (
options: Pick<RequestOptions, 'auth' | 'query'> & {
headers: HttpHeaders;
},
- security: Pick<Required<RequestOptions>, 'security'>['security']
+ security: Pick<Required<RequestOptions>, 'security'>['security'],
) => {
for (const auth of security) {
const token = await getAuthToken(auth, options.auth);
if (!token) {
@@ -209,13 +209,11 @@
break;
case 'header':
default:
options.headers = options.headers.set(name, token);
break;
- }
-
- return;
+ }
}
};
export const buildUrl: Client['buildUrl'] = (options) => {
const url = getUrl({
❯ test/clients.test.ts:201:11
❯ test/clients.test.ts:187:7
|
|
Run test coverage:
packages/openapi-ts-tests/main/test/clients.test.ts#L201
Error: Snapshot `@hey-api/client-angular > 'client without base URL' 4` mismatched
- Expected
+ Received
@@ -184,11 +184,11 @@
export const setAuthParams = async (
options: Pick<RequestOptions, 'auth' | 'query'> & {
headers: HttpHeaders;
},
- security: Pick<Required<RequestOptions>, 'security'>['security']
+ security: Pick<Required<RequestOptions>, 'security'>['security'],
) => {
for (const auth of security) {
const token = await getAuthToken(auth, options.auth);
if (!token) {
@@ -209,13 +209,11 @@
break;
case 'header':
default:
options.headers = options.headers.set(name, token);
break;
- }
-
- return;
+ }
}
};
export const buildUrl: Client['buildUrl'] = (options) => {
const url = getUrl({
❯ test/clients.test.ts:201:11
❯ test/clients.test.ts:187:7
|
|
Run test coverage:
packages/openapi-ts-tests/main/test/clients.test.ts#L201
Error: Snapshot `@hey-api/client-angular > 'SDK with required client option' 4` mismatched
- Expected
+ Received
@@ -184,11 +184,11 @@
export const setAuthParams = async (
options: Pick<RequestOptions, 'auth' | 'query'> & {
headers: HttpHeaders;
},
- security: Pick<Required<RequestOptions>, 'security'>['security']
+ security: Pick<Required<RequestOptions>, 'security'>['security'],
) => {
for (const auth of security) {
const token = await getAuthToken(auth, options.auth);
if (!token) {
@@ -209,13 +209,11 @@
break;
case 'header':
default:
options.headers = options.headers.set(name, token);
break;
- }
-
- return;
+ }
}
};
export const buildUrl: Client['buildUrl'] = (options) => {
const url = getUrl({
❯ test/clients.test.ts:201:11
❯ test/clients.test.ts:187:7
|
|
Run test coverage:
packages/openapi-ts-tests/main/test/clients.test.ts#L201
Error: Snapshot `@hey-api/client-angular > 'SDK with optional client option' 3` mismatched
- Expected
+ Received
@@ -184,11 +184,11 @@
export const setAuthParams = async (
options: Pick<RequestOptions, 'auth' | 'query'> & {
headers: HttpHeaders;
},
- security: Pick<Required<RequestOptions>, 'security'>['security']
+ security: Pick<Required<RequestOptions>, 'security'>['security'],
) => {
for (const auth of security) {
const token = await getAuthToken(auth, options.auth);
if (!token) {
@@ -209,13 +209,11 @@
break;
case 'header':
default:
options.headers = options.headers.set(name, token);
break;
- }
-
- return;
+ }
}
};
export const buildUrl: Client['buildUrl'] = (options) => {
const url = getUrl({
❯ test/clients.test.ts:201:11
❯ test/clients.test.ts:187:7
|
|
Run test coverage:
packages/openapi-ts-tests/main/test/clients.test.ts#L201
Error: Snapshot `@hey-api/client-angular > 'default output' 4` mismatched
- Expected
+ Received
@@ -184,11 +184,11 @@
export const setAuthParams = async (
options: Pick<RequestOptions, 'auth' | 'query'> & {
headers: HttpHeaders;
},
- security: Pick<Required<RequestOptions>, 'security'>['security']
+ security: Pick<Required<RequestOptions>, 'security'>['security'],
) => {
for (const auth of security) {
const token = await getAuthToken(auth, options.auth);
if (!token) {
@@ -209,13 +209,11 @@
break;
case 'header':
default:
options.headers = options.headers.set(name, token);
break;
- }
-
- return;
+ }
}
};
export const buildUrl: Client['buildUrl'] = (options) => {
const url = getUrl({
❯ test/clients.test.ts:201:11
❯ test/clients.test.ts:187:7
|
|
Run test coverage:
packages/openapi-ts-tests/main/test/3.1.x.test.ts#L1028
Error: Snapshot `OpenAPI 3.1.x > 'client with SSE (Angular)' 4` mismatched
- Expected
+ Received
@@ -184,11 +184,11 @@
export const setAuthParams = async (
options: Pick<RequestOptions, 'auth' | 'query'> & {
headers: HttpHeaders;
},
- security: Pick<Required<RequestOptions>, 'security'>['security']
+ security: Pick<Required<RequestOptions>, 'security'>['security'],
) => {
for (const auth of security) {
const token = await getAuthToken(auth, options.auth);
if (!token) {
@@ -209,13 +209,11 @@
break;
case 'header':
default:
options.headers = options.headers.set(name, token);
break;
- }
-
- return;
+ }
}
};
export const buildUrl: Client['buildUrl'] = (options) => {
const url = getUrl({
❯ test/3.1.x.test.ts:1028:9
❯ test/3.1.x.test.ts:1025:5
|
|
Run test coverage:
packages/openapi-ts/src/plugins/@hey-api/client-angular/__tests__/utils.test.ts#L180
AssertionError: expected 1 to be +0 // Object.is equality
- Expected
+ Received
- 0
+ 1
❯ src/plugins/@hey-api/client-angular/__tests__/utils.test.ts:180:39
|
background
wait
wait-all
cancel
Loading