From a17c053568c269d99e5b6671abeab341f4d7783a Mon Sep 17 00:00:00 2001 From: Douglas Christopher Wilson Date: Tue, 14 Aug 2018 16:09:28 -0400 Subject: [PATCH] tests: fix flaky test --- test/send.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/send.js b/test/send.js index d143c00..51dd3a5 100644 --- a/test/send.js +++ b/test/send.js @@ -178,7 +178,7 @@ describe('send(file).pipe(res)', function () { send(req, req.url, {root: 'test/fixtures'}) .on('stream', function (stream) { // simulate file error - process.nextTick(function () { + stream.on('open', function () { stream.emit('error', new Error('boom!')) }) })