Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
647 B

  1. var JSONStream = require('../');
  2. var test = require('tape')
  3. test('#66', function (t) {
  4. var error = 0;
  5. var stream = JSONStream
  6. .parse()
  7. .on('error', function (err) {
  8. t.ok(err);
  9. error++;
  10. })
  11. .on('end', function () {
  12. t.ok(error === 1);
  13. t.end();
  14. });
  15. stream.write('["foo":bar[');
  16. stream.end();
  17. });
  18. test('#81 - failure to parse nested objects', function (t) {
  19. var stream = JSONStream
  20. .parse('.bar.foo')
  21. .on('error', function (err) {
  22. t.error(err);
  23. })
  24. .on('end', function () {
  25. t.end();
  26. });
  27. stream.write('{"bar":{"foo":"baz"}}');
  28. stream.end();
  29. });