Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Commit

Permalink
Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Dom Harrington committed Sep 11, 2018
1 parent 128599d commit 9ea564a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 10 additions & 8 deletions packages/api-explorer/__tests__/lib/oas-to-har.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1187,13 +1187,15 @@ describe('content-type & accept header', () => {

describe('x-headers', () => {
it('should append any static headers to the request', () => {
expect(oasToHar({
'x-headers': [
{
key: 'x-api-key',
value: '123456',
},
],
}).log.entries[0].request.headers).toEqual([{ name: 'x-api-key', value: '123456' }])
expect(
oasToHar({
'x-headers': [
{
key: 'x-api-key',
value: '123456',
},
],
}).log.entries[0].request.headers,
).toEqual([{ name: 'x-api-key', value: '123456' }]);
});
});
2 changes: 1 addition & 1 deletion packages/api-explorer/src/lib/oas-to-har.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ module.exports = (

// x-headers static headers
if (oas['x-headers']) {
oas['x-headers'].forEach((header) => {
oas['x-headers'].forEach(header => {
har.headers.push({
name: header.key,
value: String(header.value),
Expand Down

0 comments on commit 9ea564a

Please sign in to comment.