We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e8df73 commit 1f11debCopy full SHA for 1f11deb
1 file changed
test/parallel/test-icu-transcode.js
@@ -38,13 +38,19 @@ for (const test in tests) {
38
utf8_to_ucs2.toString('ucs2'));
39
}
40
41
+assert.throws(
42
+ () => buffer.transcode(null, 'utf8', 'ascii'),
43
+ /^TypeError: "source" argument must be a Buffer$/
44
+);
45
+
46
assert.throws(
47
() => buffer.transcode(Buffer.from('a'), 'b', 'utf8'),
- /Unable to transcode Buffer \[U_ILLEGAL_ARGUMENT_ERROR\]/
48
+ /^Error: Unable to transcode Buffer \[U_ILLEGAL_ARGUMENT_ERROR\]/
49
);
50
51
52
() => buffer.transcode(Buffer.from('a'), 'uf8', 'b'),
53
+ /^Error: Unable to transcode Buffer \[U_ILLEGAL_ARGUMENT_ERROR\]$/
54
55
56
assert.deepStrictEqual(
0 commit comments