napi-rs/test_module/__test__/string.spec.ts
2020-09-03 19:11:30 +08:00

17 lines
452 B
TypeScript

import test from 'ava'
const bindings = require('../index.node')
test('should be able to concat string', (t) => {
const fixture = 'JavaScript 🌳 你好 napi'
t.snapshot(bindings.concatString(fixture))
})
test('should be able to concat latin1 string', (t) => {
const fixture = '涽¾DEL'
t.snapshot(bindings.concatLatin1String(fixture))
})
test('should be able to crate latin1 string', (t) => {
t.snapshot(bindings.createLatin1())
})