Update tests/library/global-fetch.spec.ts
Co-authored-by: Yury Semikhatsky <yurys@chromium.org> Signed-off-by: JacksonLei123 <46788895+JacksonLei123@users.noreply.github.com>
This commit is contained in:
parent
30d9e05c15
commit
b42bf792ed
|
|
@ -556,7 +556,8 @@ it('should not throw when fetchFailOnStatusCode is set to false inside APIReques
|
||||||
res.writeHead(404, { 'Content-Length': 10, 'Content-Type': 'text/plain' });
|
res.writeHead(404, { 'Content-Length': 10, 'Content-Type': 'text/plain' });
|
||||||
res.end('Not found.');
|
res.end('Not found.');
|
||||||
});
|
});
|
||||||
const error = await request.fetch(server.EMPTY_PAGE).catch(e => e);
|
const response = await request.fetch(server.EMPTY_PAGE);
|
||||||
|
expect(response.status()).toBe(404);
|
||||||
expect(error.message).toBeUndefined();
|
expect(error.message).toBeUndefined();
|
||||||
await request.dispose();
|
await request.dispose();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue