napi-rs/examples/napi-compat-mode/__tests__/get-napi-version.spec.ts
LongYinan 583a2ba5c8
chore(triples): update target list (#2879)
* chore(triples): update target list

* convert compat tests to esm

* Fix node 20 test
2025-08-15 18:31:56 +08:00

11 lines
265 B
TypeScript

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