test(napi): remove outdated assersion (#1423)

This commit is contained in:
LongYinan 2023-01-09 16:04:18 +08:00 committed by GitHub
parent ce2a29fca7
commit 5ab4b818f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,10 +23,8 @@ test('is detached arraybuffer should work fine', (t) => {
try {
bindings.testDetachArrayBuffer(ab)
const nonDetachedArrayBuffer = new ArrayBuffer(10)
const detachedArrayBuffer = new ArrayBuffer(0)
t.true(bindings.testIsDetachedArrayBuffer(ab))
t.false(bindings.testIsDetachedArrayBuffer(nonDetachedArrayBuffer))
t.true(bindings.testIsDetachedArrayBuffer(detachedArrayBuffer))
} catch (e) {
t.is((e as any).code, 'DetachableArraybufferExpected')
}