Blame SOURCES/test.js

60f0f6
'use strict';
60f0f6
var test = require('ava');
60f0f6
var fn = require('./');
60f0f6
60f0f6
test(function (t) {
60f0f6
	t.assert(fn('abcde') === 5);
60f0f6
	t.assert(fn('古池や') === 6);
60f0f6
	t.assert(fn('あいうabc') === 9);
60f0f6
	t.assert(fn('ノード.js') === 9);
60f0f6
	t.assert(fn('你好') === 4);
60f0f6
	t.assert(fn('안녕하세요') === 10);
60f0f6
	t.assert(fn('A\ud83c\ude00BC') === 5, 'surrogate');
60f0f6
	t.assert(fn('\u001b[31m\u001b[39m') === 0);
60f0f6
	t.end();
60f0f6
});