Sha256: 1feed5191cd2507e425d83a26672582e92c9b7a8b2c822d25d525cb0dd87d249

Contents?: true

Size: 705 Bytes

Versions: 49

Compression:

Stored size: 705 Bytes

Contents

var test = require('tape');
var Parser = require('../');

test('3 bytes of utf8', function (t) {
  t.plan(1);

  var p = new Parser();
  p.onValue = function (value) {
    t.equal(value, '├──');
  };

  p.write('"├──"');
});

test('utf8 snowman', function (t) {
  t.plan(1);

  var p = new Parser();
  p.onValue = function (value) {
    t.equal(value, '☃');
  };

  p.write('"☃"');
});

test('utf8 with regular ascii', function (t) {
  t.plan(4);

  var p = new Parser();
  var expected = [ "snow: ☃!", "xyz", "¡que!" ];
  expected.push(expected.slice());

  p.onValue = function (value) {
    t.deepEqual(value, expected.shift());
  };

  p.write('["snow: ☃!","xyz","¡que!"]');
});

Version data entries

49 entries across 40 versions & 7 rubygems

Version Path
immosquare-cleaner-0.1.51 node_modules/jsonparse/test/utf8.js
immosquare-cleaner-0.1.50 node_modules/jsonparse/test/utf8.js
immosquare-cleaner-0.1.49 node_modules/jsonparse/test/utf8.js
immosquare-cleaner-0.1.48 node_modules/jsonparse/test/utf8.js
immosquare-cleaner-0.1.47 node_modules/jsonparse/test/utf8.js
immosquare-cleaner-0.1.46 node_modules/jsonparse/test/utf8.js
pcp-server-ruby-sdk-0.0.6 node_modules/jsonparse/test/utf8.js
pcp-server-ruby-sdk-0.1.0 node_modules/jsonparse/test/utf8.js
immosquare-cleaner-0.1.45 node_modules/jsonparse/test/utf8.js
immosquare-cleaner-0.1.44 node_modules/jsonparse/test/utf8.js
immosquare-cleaner-0.1.43 node_modules/jsonparse/test/utf8.js
immosquare-cleaner-0.1.42 node_modules/jsonparse/test/utf8.js
immosquare-cleaner-0.1.41 node_modules/jsonparse/test/utf8.js
immosquare-cleaner-0.1.40 node_modules/jsonparse/test/utf8.js
immosquare-cleaner-0.1.39 node_modules/jsonparse/test/utf8.js
immosquare-cleaner-0.1.38 node_modules/jsonparse/test/utf8.js
immosquare-cleaner-0.1.32 node_modules/jsonparse/test/utf8.js
immosquare-cleaner-0.1.31 node_modules/jsonparse/test/utf8.js
immosquare-cleaner-0.1.30 node_modules/jsonparse/test/utf8.js
immosquare-cleaner-0.1.29 node_modules/jsonparse/test/utf8.js