napi-rs/test_module/__test__/get-napi-version.spec.ts
2020-10-03 14:57:56 +08:00

9 lines
249 B
TypeScript

import test from 'ava'
const bindings = require('../index.node')
test('should get napi version', (t) => {
const napiVersion = bindings.getNapiVersion()
t.true(typeof napiVersion === 'number')
t.is(`${napiVersion}`, process.versions.napi)
})