1 | const WCString = require('../')
|
2 | const test = require('tape')
|
3 |
|
4 | test('regular init', function (t) {
|
5 | t.equal(WCString('abcd').size(), 4, 'functional use')
|
6 | t.equal(WCString('あい').size(), 4, 'functional use, double width')
|
7 | t.equal(new WCString('あい').size(), 4, 'instance use, double width')
|
8 | t.equal(new WCString('ai').size(), 2, 'instance use, double width')
|
9 | t.end()
|
10 | })
|