var it = require('it-is').style('colour')
  , split = require('..')

exports ['emit mapper exceptions as error events'] = function (test) {
  var s = split(JSON.parse)
    , caughtError = false
    , rows = []
 
  s.on('error', function (err) {
    caughtError = true
  })
 
  s.on('data', function (row) { rows.push(row) })

  s.write('{"a":1}\n{"')
  it(caughtError).equal(false)
  s.write('b":2}\n{"c":}')
  it(caughtError).equal(true)
  s.end()
 
  it(rows).deepEqual([
    { a: 1 },
    { b: 2 }
  ])
 
  test.done()
}

@@ -375,16 +375,52 @@
 (false)%0A
+  it(rows).deepEqual(%5B %7B a: 1 %7D %5D)%0A%0A
   s.writ
@@ -435,16 +435,18 @@
 %5Cn%7B%22c%22:%7D
+%5Cn
 ')%0A  it(
@@ -474,20 +474,8 @@
 ue)%0A
-  s.end()%0A %0A
   it
@@ -492,20 +492,16 @@
 pEqual(%5B
-%0A   
  %7B a: 1 
@@ -502,20 +502,16 @@
  a: 1 %7D,
-%0A   
  %7B b: 2 
@@ -515,15 +515,22 @@
  2 %7D
-%0A 
  %5D)%0A
+%0A
  
+ s.end()
 %0A  t

fix the test to write a newline so that the error actually triggers, check more things