Skip to content

Commit 50aa251

Browse files
listen error event
1 parent bd4ff2b commit 50aa251

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/compression.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,9 @@ describe('compression()', function () {
155155
}
156156

157157
var server = createServer({ threshold: 0 }, function (req, res) {
158+
res.on('error', onError)
158159
res.setHeader('Content-Type', 'text/plain')
159-
res.end()
160+
res.end('hello, world')
160161

161162
res.write('hello, world', onError)
162163

0 commit comments

Comments
 (0)