11cb0ef41Sopenharmony_civar test = require('tape'); 21cb0ef41Sopenharmony_civar Parser = require('../'); 31cb0ef41Sopenharmony_ci 41cb0ef41Sopenharmony_citest('parse surrogate pair', function (t) { 51cb0ef41Sopenharmony_ci t.plan(1); 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ci var p = new Parser(); 81cb0ef41Sopenharmony_ci p.onValue = function (value) { 91cb0ef41Sopenharmony_ci t.equal(value, ''); 101cb0ef41Sopenharmony_ci }; 111cb0ef41Sopenharmony_ci 121cb0ef41Sopenharmony_ci p.write('"\\uD83D\\uDE0B"'); 131cb0ef41Sopenharmony_ci}); 141cb0ef41Sopenharmony_ci 151cb0ef41Sopenharmony_citest('parse chunked surrogate pair', function (t) { 161cb0ef41Sopenharmony_ci t.plan(1); 171cb0ef41Sopenharmony_ci 181cb0ef41Sopenharmony_ci var p = new Parser(); 191cb0ef41Sopenharmony_ci p.onValue = function (value) { 201cb0ef41Sopenharmony_ci t.equal(value, ''); 211cb0ef41Sopenharmony_ci }; 221cb0ef41Sopenharmony_ci 231cb0ef41Sopenharmony_ci p.write('"\\uD83D'); 241cb0ef41Sopenharmony_ci p.write('\\uDE0B"'); 251cb0ef41Sopenharmony_ci}); 261cb0ef41Sopenharmony_ci 27