diff options
author | Kenta Moriuchi <moriken@kimamass.com> | 2023-11-07 06:18:28 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-06 22:18:28 +0100 |
commit | 90189dd9974be01596ec776e63a4eceef1a036e0 (patch) | |
tree | 5ef3171dfc4181e1682d86ccd4daa5c874bc261a /cli/tests/node_compat/test/parallel/test-util.js | |
parent | 7eb34c7a36ac065d169e3645fc8a3da3e71431d7 (diff) |
fix(ext): use `String#toWellFormed` in ext/webidl and ext/node (#21054)
Fixes #18802
This PR adds `util.toUSVString` to node:util:
```js
import util from "node:util";
util.toUSVString("string\ud801"); // => "string\ufffd"
```
Diffstat (limited to 'cli/tests/node_compat/test/parallel/test-util.js')
-rw-r--r-- | cli/tests/node_compat/test/parallel/test-util.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cli/tests/node_compat/test/parallel/test-util.js b/cli/tests/node_compat/test/parallel/test-util.js index 5d1ed9b30..eaffc7f6d 100644 --- a/cli/tests/node_compat/test/parallel/test-util.js +++ b/cli/tests/node_compat/test/parallel/test-util.js @@ -161,8 +161,7 @@ assert.strictEqual(util.isFunction(function() {}), true); assert.strictEqual(util.isFunction(), false); assert.strictEqual(util.isFunction('string'), false); -// TODO(wafuwafu13): Enable this when `toUSVString` is ready. -// assert.strictEqual(util.toUSVString('string\ud801'), 'string\ufffd'); +assert.strictEqual(util.toUSVString('string\ud801'), 'string\ufffd'); { assert.strictEqual(util.types.isNativeError(new Error()), true); |