-
Couldn't load subscription status.
- Fork 165
Fix for ticket #112 - incomplete json #117
base: master
Are you sure you want to change the base?
Conversation
|
that looks right, but I think it should return after emitting the error. |
|
as we still need the |
|
the test all pass on my machine, with node versions 4 and 6 |
|
ah, node streams do not have an end event after an error. fs Readable stream also does not make an end event after an error |
|
@dominictarr I fixed the code and existing tests that assumed that |
|
@cmjartan can you describe what it may be incompatible with? if it sounds slightly serious, I'll make it a new major version. |
|
@dominictarr checked my changes again, and I think it's not incompatible. It's just that some tests like |
|
it's not always clear for me by reading the tests which scenario is meant to be tested |
|
Hi @cmjartan I tried your PR and this test case fails: test('#112 "Incomplete JSON" error is emitted', function (t) {
var stream = JSONStream
.parse()
.on('error', function (err) {
t.ok("error emitted: " + err.message)
t.end()
})
stream.write('{"rows":[{"id":"id-1","name":"Name A"}') // I changed the incomplete JSON
stream.end()
}) |
|
Any updates on this? Tests are passing according to Travis |
|
@cmjartan did you try to run my test in the comment? It does not pass. |
|
npm run test => Tested on Node 4/6/8 |
|
Ok, now I understood ;-) |
|
@dominictarr now it should be more reliable. I also check if the |
|
@dominictarr do you need anything more for the merge? |
|
@dominictarr it would be nice to see this PR on master :-) |
|
+1 :) |
|
this would be really helpful guys! :) |
No description provided.