Skip to content

Commit c377053

Browse files
jfarseneau-wbjasnell
authored andcommitted
test: put expected assert value in correct place
The order of arguments in test-fs-readdir-ucs2 was the opposite of what is recommended in the documentation, which is that the first value should be the value being tested, and the second value is the expected value. This fixes the test to make it conform to the documentation. PR-URL: #23505 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 345974a commit c377053

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: test/parallel/test-fs-readdir-ucs2.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ try {
2525

2626
fs.readdir(tmpdir.path, 'ucs2', common.mustCall((err, list) => {
2727
assert.ifError(err);
28-
assert.strictEqual(1, list.length);
28+
assert.strictEqual(list.length, 1);
2929
const fn = list[0];
30-
assert.deepStrictEqual(filebuff, Buffer.from(fn, 'ucs2'));
30+
assert.deepStrictEqual(Buffer.from(fn, 'ucs2'), filebuff);
3131
assert.strictEqual(fn, filename);
3232
}));

0 commit comments

Comments
 (0)