Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8f2bdac

Browse filesBrowse files
simonacoMylesBorins
authored andcommitted
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. PR-URL: #24151 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent 380789e commit 8f2bdac
Copy full SHA for 8f2bdac

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-fs-readfile-empty.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-fs-readfile-empty.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ fs.readFile(fn, function(err, data) {
3535
});
3636

3737
fs.readFile(fn, 'utf8', function(err, data) {
38-
assert.strictEqual('', data);
38+
assert.strictEqual(data, '');
3939
});
4040

4141
fs.readFile(fn, { encoding: 'utf8' }, function(err, data) {
42-
assert.strictEqual('', data);
42+
assert.strictEqual(data, '');
4343
});
4444

4545
assert.ok(fs.readFileSync(fn));
46-
assert.strictEqual('', fs.readFileSync(fn, 'utf8'));
46+
assert.strictEqual(fs.readFileSync(fn, 'utf8'), '');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.