summaryrefslogtreecommitdiff
path: root/cli/tests/node_compat/test/parallel/test-buffer-sharedarraybuffer.js
diff options
context:
space:
mode:
authorYoshiya Hinosawa <stibium121@gmail.com>2023-03-21 22:38:07 +0900
committerGitHub <noreply@github.com>2023-03-21 22:38:07 +0900
commitaa729a42b4257b4d58bfcd0270566756c9470d08 (patch)
treead9bcd33f812d753c62250094d416834999fb5a5 /cli/tests/node_compat/test/parallel/test-buffer-sharedarraybuffer.js
parentc34e26a9d56596645ee63b19f99c09cf4aea4b37 (diff)
chore(tools): restore node compat test setup script (#18290)
Diffstat (limited to 'cli/tests/node_compat/test/parallel/test-buffer-sharedarraybuffer.js')
-rw-r--r--cli/tests/node_compat/test/parallel/test-buffer-sharedarraybuffer.js34
1 files changed, 0 insertions, 34 deletions
diff --git a/cli/tests/node_compat/test/parallel/test-buffer-sharedarraybuffer.js b/cli/tests/node_compat/test/parallel/test-buffer-sharedarraybuffer.js
deleted file mode 100644
index 9ec8f1a6d..000000000
--- a/cli/tests/node_compat/test/parallel/test-buffer-sharedarraybuffer.js
+++ /dev/null
@@ -1,34 +0,0 @@
-// deno-fmt-ignore-file
-// deno-lint-ignore-file
-
-// Copyright Joyent and Node contributors. All rights reserved. MIT license.
-// Taken from Node 18.12.1
-// This file is automatically generated by "node/_tools/setup.ts". Do not modify this file manually
-
-'use strict';
-
-require('../common');
-const assert = require('assert');
-
-const sab = new SharedArrayBuffer(24);
-const arr1 = new Uint16Array(sab);
-const arr2 = new Uint16Array(12);
-arr2[0] = 5000;
-arr1[0] = 5000;
-arr1[1] = 4000;
-arr2[1] = 4000;
-
-const arr_buf = Buffer.from(arr1.buffer);
-const ar_buf = Buffer.from(arr2.buffer);
-
-assert.deepStrictEqual(arr_buf, ar_buf);
-
-arr1[1] = 6000;
-arr2[1] = 6000;
-
-assert.deepStrictEqual(arr_buf, ar_buf);
-
-// Checks for calling Buffer.byteLength on a SharedArrayBuffer.
-assert.strictEqual(Buffer.byteLength(sab), sab.byteLength);
-
-Buffer.from({ buffer: sab }); // Should not throw.