Skip to content

Commit

Permalink
parse test: early end isn't a zlib error on v4
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed May 10, 2017
1 parent 9440c43 commit 753ea13
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,10 +500,12 @@ t.test('truncated gzip input', t => {
const split = Math.floor(tgz.length * 2 / 3)
const trunc = tgz.slice(0, split)

t.test('early end', t => {
const skipEarlyEnd = process.version.match(/^v4\./)
t.test('early end', {
skip: skipEarlyEnd ? 'not a zlib error on v4' : false
}, t => {
const warnings = []
const p = new Parse({
onwarn: message => warnings.push(message) })
const p = new Parse({ onwarn: message => warnings.push(message) })
let aborted = false
p.on('abort', _ => aborted = true)
p.end(trunc)
Expand Down

0 comments on commit 753ea13

Please sign in to comment.