We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1e889b8 commit cda0ccaCopy full SHA for cda0cca
test/parallel/test-buffer-includes.js
@@ -273,15 +273,17 @@ for (let lengthIndex = 0; lengthIndex < lengths.length; lengthIndex++) {
273
}
274
275
276
-assert.throws(function() {
277
- b.includes(function() { });
278
-});
279
+const expectedError =
+ /^TypeError: "val" argument must be string, number or Buffer$/;
+assert.throws(() => {
+ b.includes(() => {});
280
+}, expectedError);
281
282
b.includes({});
283
284
285
b.includes([]);
286
287
288
// test truncation of Number arguments to uint8
289
{
0 commit comments