Skip to content

Commit ece20ab

Browse files
committed
Add new line to the end of HTTP response for better use in terminal
1 parent 0b42272 commit ece20ab

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

add-http-pages/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ it('responses 404', async () => {
151151
await app.listen()
152152
let err = await requestError(app, 'GET', '/unknown')
153153
expect(err.statusCode).toEqual(404)
154-
expect(err.message).toEqual('Not found')
154+
expect(err.message).toEqual('Not found\n')
155155
})
156156

157157
it('has custom HTTP processor', async () => {

base-server/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ export class BaseServer {
771771
}
772772
if (!processed) {
773773
res.writeHead(404, { 'Content-Type': 'text/plain' })
774-
res.end('Not found')
774+
res.end('Not found\n')
775775
}
776776
} else {
777777
await rule(req, res)

0 commit comments

Comments
 (0)