mirror of
https://github.com/bvanroll/rpiRadio.git
synced 2025-08-31 21:12:46 +00:00
Initial Commit
This commit is contained in:
23
ProjectNow/NodeServer/node_modules/split/test/options.asynct.js
generated
vendored
Normal file
23
ProjectNow/NodeServer/node_modules/split/test/options.asynct.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
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()
|
||||
}
|
Reference in New Issue
Block a user