Skip to content

Commit a8a30a9

Browse files
jfarseneau-wbMylesBorins
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 <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent ac70ab0 commit a8a30a9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/parallel/test-fs-readdir-ucs2.js

Lines changed: 2 additions & 2 deletions
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)