Skip to content

Commit

Permalink
Pare down noop data listener
Browse files Browse the repository at this point in the history
  • Loading branch information
zemccartney committed May 23, 2019
1 parent 1e946cb commit da21aa6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const Lab = require('@hapi/lab');
const Code = require('@hapi/code');
const Hapi = require('@hapi/hapi');
const Boom = require('@hapi/boom');
const Hoek = require('@hapi/hoek');
const Toys = require('toys');
const Http = require('http');
const Https = require('https');
Expand Down Expand Up @@ -1238,7 +1239,7 @@ describe('Underdog', () => {

// Consumes received data, required to trigger req stream's end
// See: https://github.com/nodejs/help/issues/650
request.on('data', () => {});
request.on('data', Hoek.ignore);

const [headers, [ignore, event]] = await Promise.all([ // eslint-disable-line no-unused-vars
Toys.event(request, 'response'),
Expand Down

0 comments on commit da21aa6

Please sign in to comment.