Skip to content

Commit

Permalink
test: remove second arg from assert.ifError()
Browse files Browse the repository at this point in the history
`test/parallel/test-fs-readfile.js` has a call to
`assert.ifError()` that receives two arguments.

There is no second argument used in `assert.ifError()`.
This PR removes this argument.

PR-URL: #22190
Reviewed-By: George Adams <george.adams@uk.ibm.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
mhamwala authored and rvagg committed Aug 15, 2018
1 parent d4f3615 commit cefc4a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/parallel/test-fs-readfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ for (const e of fileInfo) {
for (const e of fileInfo) {
fs.readFile(e.name, common.mustCall((err, buf) => {
console.log(`Validating readFile on file ${e.name} of length ${e.len}`);
assert.ifError(err, 'An error occurred');
assert.ifError(err);
assert.deepStrictEqual(buf, e.contents, 'Incorrect file contents');
}));
}

0 comments on commit cefc4a0

Please sign in to comment.