diff options
author | Kat Marchán <kzm@sykosomatic.org> | 2016-12-18 20:22:09 -0800 |
---|---|---|
committer | Myles Borins <myles.borins@gmail.com> | 2016-12-28 15:30:50 -0500 |
commit | 9946519fba73687d34dccd5813808252a1973f3c (patch) | |
tree | 74d7194d2a00743bcd905027195e7e8000c5ac5a /deps/npm/node_modules/JSONStream/test/issues.js | |
parent | 4d3b487b791606ea965f6280ce0eeea03d79b660 (diff) | |
download | android-node-v8-9946519fba73687d34dccd5813808252a1973f3c.tar.gz android-node-v8-9946519fba73687d34dccd5813808252a1973f3c.tar.bz2 android-node-v8-9946519fba73687d34dccd5813808252a1973f3c.zip |
deps: upgrade npm to 4.0.5
PR-URL: https://github.com/nodejs/node/pull/10330
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Diffstat (limited to 'deps/npm/node_modules/JSONStream/test/issues.js')
-rw-r--r-- | deps/npm/node_modules/JSONStream/test/issues.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/deps/npm/node_modules/JSONStream/test/issues.js b/deps/npm/node_modules/JSONStream/test/issues.js new file mode 100644 index 0000000000..ea4c74337a --- /dev/null +++ b/deps/npm/node_modules/JSONStream/test/issues.js @@ -0,0 +1,34 @@ +var JSONStream = require('../'); +var test = require('tape') + +test('#66', function (t) { + var error = 0; + var stream = JSONStream + .parse() + .on('error', function (err) { + t.ok(err); + error++; + }) + .on('end', function () { + t.ok(error === 1); + t.end(); + }); + + stream.write('["foo":bar['); + stream.end(); + +}); + +test('#81 - failure to parse nested objects', function (t) { + var stream = JSONStream + .parse('.bar.foo') + .on('error', function (err) { + t.error(err); + }) + .on('end', function () { + t.end(); + }); + + stream.write('{"bar":{"foo":"baz"}}'); + stream.end(); +}); |