mirror of
https://github.com/napi-rs/napi-rs.git
synced 2025-12-08 19:56:07 +00:00
9 lines
242 B
TypeScript
9 lines
242 B
TypeScript
import test from 'ava'
|
|
|
|
const bindings = require('../index.node')
|
|
|
|
test('should get arraybuffer length', (t) => {
|
|
const fixture = Buffer.from('wow, hello')
|
|
t.is(bindings.getArraybufferLength(fixture.buffer), fixture.buffer.byteLength)
|
|
})
|