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

Commit ac5a385

Browse files
dependabot-preview[bot]erunion
authored andcommitted
chore(deps-dev): bump prettier from 1.18.2 to 1.19.1 (#368)
* chore(deps-dev): bump prettier from 1.18.2 to 1.19.1 Bumps [prettier](https://github.com/prettier/prettier) from 1.18.2 to 1.19.1. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md) - [Commits](prettier/prettier@1.18.2...1.19.1) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * chore: re-running prettier * chore: re-running prettier
1 parent cd7dba3 commit ac5a385

File tree

9 files changed

+816
-98
lines changed

9 files changed

+816
-98
lines changed

packages/api-explorer/__tests__/lib/get-auth.test.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,12 @@ it('should not error if oas.components is not set', () => {
3939
const { getSingle } = getAuth;
4040

4141
const topLevelUser = { apiKey: '123456', user: 'user', pass: 'pass' };
42-
const keysUser = { keys: [{ apiKey: '123456', name: 'app-1' }, { apiKey: '7890', name: 'app-2' }] };
42+
const keysUser = {
43+
keys: [
44+
{ apiKey: '123456', name: 'app-1' },
45+
{ apiKey: '7890', name: 'app-2' },
46+
],
47+
};
4348
const topLevelSchemeUser = { schemeName: 'scheme-key' };
4449
const keysSchemeUser = {
4550
keys: [

packages/api-explorer/__tests__/lib/parse-response.test.js

Lines changed: 73 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,22 @@ test('should pass through URL with proxy removed', async () => {
4848

4949
test('should pass through URL with query string', async () => {
5050
expect(
51-
(await parseResponse(
52-
createHar({
53-
method,
54-
url,
55-
headers: [],
56-
queryString: [
57-
{
58-
name: 'a',
59-
value: '123456',
60-
},
61-
],
62-
}),
63-
response,
64-
)).url,
51+
(
52+
await parseResponse(
53+
createHar({
54+
method,
55+
url,
56+
headers: [],
57+
queryString: [
58+
{
59+
name: 'a',
60+
value: '123456',
61+
},
62+
],
63+
}),
64+
response,
65+
)
66+
).url,
6567
).toBe('http://petstore.swagger.io/v2/pet?a=123456');
6668
});
6769

@@ -71,62 +73,70 @@ test('should pass through method', async () => {
7173

7274
test('should return array for request headers', async () => {
7375
expect(
74-
(await parseResponse(
75-
createHar({
76-
headers: [
77-
{
78-
name: 'Authorization',
79-
value: 'Bearer api-key',
80-
},
81-
{
82-
name: 'Authorization1',
83-
value: 'Bearer api-key1',
84-
},
85-
],
86-
url,
87-
}),
88-
response,
89-
)).requestHeaders,
76+
(
77+
await parseResponse(
78+
createHar({
79+
headers: [
80+
{
81+
name: 'Authorization',
82+
value: 'Bearer api-key',
83+
},
84+
{
85+
name: 'Authorization1',
86+
value: 'Bearer api-key1',
87+
},
88+
],
89+
url,
90+
}),
91+
response,
92+
)
93+
).requestHeaders,
9094
).toEqual(['Authorization: Bearer api-key', 'Authorization1: Bearer api-key1']);
9195
});
9296

9397
test('should return with post data if set', async () => {
9498
expect(
95-
(await parseResponse(
96-
createHar({
97-
headers: [],
98-
postData: {
99-
text: JSON.stringify({ a: 1 }),
100-
},
101-
url,
102-
}),
103-
response,
104-
)).requestBody,
99+
(
100+
await parseResponse(
101+
createHar({
102+
headers: [],
103+
postData: {
104+
text: JSON.stringify({ a: 1 }),
105+
},
106+
url,
107+
}),
108+
response,
109+
)
110+
).requestBody,
105111
).toEqual(JSON.stringify({ a: 1 }));
106112
});
107113

108114
test('should return with null if postData is empty object', async () => {
109115
expect(
110-
(await parseResponse(
111-
createHar({
112-
headers: [],
113-
postData: {},
114-
url,
115-
}),
116-
response,
117-
)).requestBody,
116+
(
117+
await parseResponse(
118+
createHar({
119+
headers: [],
120+
postData: {},
121+
url,
122+
}),
123+
response,
124+
)
125+
).requestBody,
118126
).toEqual(null);
119127
});
120128

121129
test('should return with null if postData is undefined', async () => {
122130
expect(
123-
(await parseResponse(
124-
createHar({
125-
headers: [],
126-
url,
127-
}),
128-
response,
129-
)).requestBody,
131+
(
132+
await parseResponse(
133+
createHar({
134+
headers: [],
135+
url,
136+
}),
137+
response,
138+
)
139+
).requestBody,
130140
).toEqual(null);
131141
});
132142

@@ -147,12 +157,14 @@ test('should return null for `type` if content-type header missing', async () =>
147157

148158
test('should remove x-final-url header set by the proxy', async () => {
149159
expect(
150-
(await parseResponse(
151-
har,
152-
new Response('', {
153-
headers: { 'x-final-url': 'http://example.com' },
154-
}),
155-
)).responseHeaders,
160+
(
161+
await parseResponse(
162+
har,
163+
new Response('', {
164+
headers: { 'x-final-url': 'http://example.com' },
165+
}),
166+
)
167+
).responseHeaders,
156168
).toEqual([]);
157169
});
158170

0 commit comments

Comments
 (0)