Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: fix arguments order
the actual and expected arguments in assert.strictEqual() calls are in
the wrong order. Any literal value should be the second argument while
the first argument should be the value returned by a function/be the
calculated value.
  • Loading branch information
simonaco committed Nov 6, 2018
commit 1cfc9e02bbc6f363bde05f8ffd609fa3f17a0d80
6 changes: 3 additions & 3 deletions test/parallel/test-fs-readfile-empty.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ fs.readFile(fn, function(err, data) {
});

fs.readFile(fn, 'utf8', function(err, data) {
assert.strictEqual('', data);
assert.strictEqual(data, '');
});

fs.readFile(fn, { encoding: 'utf8' }, function(err, data) {
assert.strictEqual('', data);
assert.strictEqual(data, '');
});

assert.ok(fs.readFileSync(fn));
assert.strictEqual('', fs.readFileSync(fn, 'utf8'));
assert.strictEqual(fs.readFileSync(fn, 'utf8'), '');