diff options
author | Aapo Alasuutari <aapo.alasuutari@gmail.com> | 2023-10-08 11:09:50 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-08 11:09:50 +0900 |
commit | effb5e1ce417e9b7f22adcdc598e9a5ec593f4a2 (patch) | |
tree | 620544d0d4051ad16d78c5df3fbed0441b800ea0 /cli/tests/node_compat/test/parallel/test-buffer-from.js | |
parent | edeccef4990598620bf5595df6fc8c1b1b1a7f73 (diff) |
fix(node/buffer): utf8ToBytes should return a Uint8Array (#20769)
Diffstat (limited to 'cli/tests/node_compat/test/parallel/test-buffer-from.js')
-rw-r--r-- | cli/tests/node_compat/test/parallel/test-buffer-from.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cli/tests/node_compat/test/parallel/test-buffer-from.js b/cli/tests/node_compat/test/parallel/test-buffer-from.js index ef023cf0b..6483e2a63 100644 --- a/cli/tests/node_compat/test/parallel/test-buffer-from.js +++ b/cli/tests/node_compat/test/parallel/test-buffer-from.js @@ -2,14 +2,14 @@ // deno-lint-ignore-file // Copyright Joyent and Node contributors. All rights reserved. MIT license. -// Taken from Node 16.13.0 -// This file is automatically generated by "node/_tools/setup.ts". Do not modify this file manually +// Taken from Node 18.12.1 +// This file is automatically generated by `tools/node_compat/setup.ts`. Do not modify this file manually. 'use strict'; const common = require('../common'); const { deepStrictEqual, throws } = require('assert'); -const { runInNewContext } = require('vm'); +// const { runInNewContext } = require('vm'); const checkString = 'test'; @@ -36,7 +36,6 @@ class MyBadPrimitive { deepStrictEqual(Buffer.from(new String(checkString)), check); deepStrictEqual(Buffer.from(new MyString()), check); deepStrictEqual(Buffer.from(new MyPrimitive()), check); - // TODO(Soremwar) // Enable once again when vm works correctly // deepStrictEqual( @@ -66,7 +65,7 @@ deepStrictEqual(Buffer.from(new MyPrimitive()), check); 'Buffer, ArrayBuffer, or Array or an Array-like Object.' + common.invalidArgTypeHelper(input) }; - throws(() => Buffer.from(input), errObj); + throws(() => Buffer.from(input), errObj); throws(() => Buffer.from(input, 'hex'), errObj); }); |