mirror of
https://github.com/napi-rs/napi-rs.git
synced 2025-12-08 19:56:07 +00:00
16 lines
409 B
TypeScript
16 lines
409 B
TypeScript
import test from 'ava'
|
|
|
|
// @ts-expect-error
|
|
import bindings from '../index.node'
|
|
|
|
test('either should work', (t) => {
|
|
const fixture = 'napi'
|
|
t.is(bindings.eitherNumberString(1), 101)
|
|
t.is(bindings.eitherNumberString(fixture), `Either::B(${fixture})`)
|
|
})
|
|
|
|
test('dynamic argument length should work', (t) => {
|
|
t.is(bindings.dynamicArgumentLength(1), 101)
|
|
t.is(bindings.dynamicArgumentLength(), 42)
|
|
})
|