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

Commit

Permalink
chore: Bump node-fetch from 2.0.0-alpha.9 to 2.6.0 (#280)
Browse files Browse the repository at this point in the history
* Bump node-fetch from 2.0.0-alpha.9 to 2.6.0

Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.0.0-alpha.9 to 2.6.0.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/bitinn/node-fetch/blob/master/CHANGELOG.md)
- [Commits](node-fetch/node-fetch@v2.0.0-alpha.9...v2.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Updating some tests to comply with node-fetch updates.
  • Loading branch information
dependabot-preview[bot] authored and erunion committed Nov 22, 2019
1 parent dc19a58 commit d7e826f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions packages/api-explorer/__tests__/lib/parse-response.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,10 @@ test('should return `type` from content-type header', async () => {
expect((await parseResponse(har, response)).type).toBe('application/json');
});

test('should return null for `type` if content-type header missing', async () => {
expect((await parseResponse(har, new Response(responseBody))).type).toBeNull();
test('should autodetect a content-type if content-type header missing', async () => {
expect((await parseResponse(har, new Response(responseBody))).type).toBe(
'text/plain;charset=UTF-8',
);
});

test('should remove x-final-url header set by the proxy', async () => {
Expand All @@ -165,7 +167,7 @@ test('should remove x-final-url header set by the proxy', async () => {
}),
)
).responseHeaders,
).toStrictEqual([]);
).toStrictEqual(['content-type: text/plain;charset=UTF-8']);
});

test('should pass through status', async () => {
Expand Down
6 changes: 3 additions & 3 deletions packages/api-explorer/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d7e826f

Please sign in to comment.