[ci] format

This commit is contained in:
matthewp 2022-03-29 20:59:59 +00:00 committed by GitHub Actions
parent f048cdff70
commit c24e5c9687
2 changed files with 3 additions and 3 deletions

View file

@ -45,7 +45,7 @@ async function writeWebResponse(res: http.ServerResponse, webResponse: Response)
const { status, headers, body } = webResponse;
res.writeHead(status, Object.fromEntries(headers.entries()));
if (body) {
if(body instanceof Readable) {
if (body instanceof Readable) {
body.pipe(res);
return;
} else {

View file

@ -50,8 +50,8 @@ describe('API routes in SSR', () => {
it('Can POST to API routes', async () => {
const response = await fixture.fetch('/food.json', {
method: 'POST',
body: `some data`
})
body: `some data`,
});
expect(response.status).to.equal(200);
const text = await response.text();
expect(text).to.equal(`ok`);