2020-08-24 16:16:35 +08:00
|
|
|
import test from 'ava'
|
2020-07-03 00:31:50 +08:00
|
|
|
|
|
|
|
const bindings = require('../index.node')
|
|
|
|
|
|
|
|
test('should get napi version', (t) => {
|
|
|
|
const napiVersion = bindings.getNapiVersion()
|
|
|
|
t.true(typeof napiVersion === 'number')
|
2020-08-24 16:16:35 +08:00
|
|
|
// @ts-expect-error
|
2020-07-03 00:31:50 +08:00
|
|
|
t.is(`${napiVersion}`, process.versions.napi)
|
|
|
|
})
|