Skip to content

Commit ff4544c

Browse files
committed
- Working e2e tests
1 parent 9662125 commit ff4544c

File tree

5 files changed

+3
-9
lines changed

5 files changed

+3
-9
lines changed

src/templates/core/fetch/getHeaders.hbs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Pr
1515
[key]: String(value),
1616
}), {} as Record<string, string>);
1717

18-
const headers =
19-
2018
if (isStringWithValue(token)) {
2119
headers['Authorization'] = `Bearer ${token}`;
2220
}

src/templates/core/node/getHeaders.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Pr
44
const password = await resolve(options, config.PASSWORD);
55
const additionalHeaders = await resolve(options, config.HEADERS);
66

7-
const defaultHeaders = Object.entries({
7+
const headers = Object.entries({
88
Accept: 'application/json',
99
...additionalHeaders,
1010
...options.headers,

src/templates/core/xhr/getHeaders.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Pr
44
const password = await resolve(options, config.PASSWORD);
55
const additionalHeaders = await resolve(options, config.HEADERS);
66

7-
const defaultHeaders = Object.entries({
7+
const headers = Object.entries({
88
Accept: 'application/json',
99
...additionalHeaders,
1010
...options.headers,

test/__snapshots__/index.spec.ts.snap

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,6 @@ const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Pr
376376
[key]: String(value),
377377
}), {} as Record<string, string>);
378378

379-
const headers =
380-
381379
if (isStringWithValue(token)) {
382380
headers['Authorization'] = \`Bearer \${token}\`;
383381
}
@@ -3279,8 +3277,6 @@ const getHeaders = async (config: OpenAPIConfig, options: ApiRequestOptions): Pr
32793277
[key]: String(value),
32803278
}), {} as Record<string, string>);
32813279

3282-
const headers =
3283-
32843280
if (isStringWithValue(token)) {
32853281
headers['Authorization'] = \`Bearer \${token}\`;
32863282
}

test/e2e/v3.angular.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe('v3.angular', () => {
1313
await generateClient('v3/angular/app/src', 'v3', 'angular');
1414
copyAsset('main-angular.ts', 'v3/angular/app/src/main.ts');
1515
buildAngularProject('v3/angular', 'app', 'dist');
16-
await server.start('v3/angular/dist');
16+
await server.start('v3/angular/app/dist');
1717
await browser.start();
1818
}, 30000);
1919

0 commit comments

Comments
 (0)