xref: /third_party/node/test/addons/new-isolate-addon/test.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/addons/new-isolate-addon/
11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_ciconst common = require('../../common');
31cb0ef41Sopenharmony_ciconst binding = require(`./build/${common.buildType}/binding`);
41cb0ef41Sopenharmony_ciconst assert = require('assert');
51cb0ef41Sopenharmony_ci
61cb0ef41Sopenharmony_ciconst arg = new SharedArrayBuffer(1);
71cb0ef41Sopenharmony_cibinding.runInSeparateIsolate('const arr = new Uint8Array(arg); arr[0] = 0x42;', arg);
81cb0ef41Sopenharmony_ciassert.deepStrictEqual(new Uint8Array(arg), new Uint8Array([0x42]));
9

Indexes created Thu Nov 07 10:32:03 CST 2024