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