diff --git a/test/sequential/test-fs-readfile-tostring-fail.js b/test/sequential/test-fs-readfile-tostring-fail.js index 88cf7347efbfdf..81c7a941eb9476 100644 --- a/test/sequential/test-fs-readfile-tostring-fail.js +++ b/test/sequential/test-fs-readfile-tostring-fail.js @@ -30,11 +30,10 @@ for (let i = 0; i < 201; i++) { stream.end(); stream.on('finish', common.mustCall(function() { - // make sure that the toString does not throw an error fs.readFile(file, 'utf8', common.mustCall(function(err, buf) { assert.ok(err instanceof Error); - assert(/^(Array buffer allocation failed|"toString\(\)" failed)$/ - .test(err.message)); + assert.ok(/^(Array buffer allocation failed|"toString\(\)" failed)$/ + .test(err.message)); assert.strictEqual(buf, undefined); })); }));