mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 04:39:10 +00:00
fix(napi): fix is_detached_arraybuffer (#16478)
This commit is contained in:
parent
59ac110edd
commit
207dd8d111
5 changed files with 52 additions and 4 deletions
12
test_napi/arraybuffer_test.js
Normal file
12
test_napi/arraybuffer_test.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
|
||||
|
||||
import { assertEquals, loadTestLibrary } from "./common.js";
|
||||
|
||||
const typedarray = loadTestLibrary();
|
||||
|
||||
Deno.test("napi arraybuffer detach", function () {
|
||||
const buf = new ArrayBuffer(5);
|
||||
assertEquals(buf.byteLength, 5);
|
||||
typedarray.test_detached(buf);
|
||||
assertEquals(buf.byteLength, 0);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue