HEX
Server: nginx/1.28.3
System: Linux lightweb-s1 5.15.0-173-generic #183-Ubuntu SMP Fri Mar 6 13:29:34 UTC 2026 x86_64
User: drdrivek-71 (1047)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: /home/dnlightw-124/dn.lightweb.kr/node_modules/split/test/options.asynct.js
var it = require('it-is').style('colour')
  , split = require('..')

exports ['maximum buffer limit'] = function (test) {
  var s = split(JSON.parse, null, {
    maxLength: 2
  })
    , caughtError = false
    , rows = []

  s.on('error', function (err) {
    caughtError = true
  })

  s.on('data', function (row) { rows.push(row) })

  s.write('{"a":1}\n{"')
  s.write('{    "')
  it(caughtError).equal(true)

  s.end()
  test.done()
}