UNPKG
stream-to-json
Version:
latest (0.0.1)
0.0.1
0.0.0
Deserialize JSON from a stream
github.com/juliangruber/stream-to-json
juliangruber/stream-to-json
stream-to-json
/
test
/
json-error.js
16 lines
(12 loc)
•
272 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
var
through =
require
(
'through'
);
var
test =
require
(
'tape'
);
var
toJSON =
require
(
'..'
);
test
(
'json error'
,
function
(
t
) { t.
plan
(
1
);
var
stream =
through
();
toJSON
(stream,
function
(
err
) { t.
ok
(err); }); stream.
queue
(
'foo'
); stream.
queue
(
null
); });