Skip to content

Commit

Permalink
test: put expected assert value in correct place
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jfarseneau-wb authored and MylesBorins committed Oct 30, 2018
1 parent d590aa8 commit 23d6932
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-fs-readdir-ucs2.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ try {

fs.readdir(tmpdir.path, 'ucs2', common.mustCall((err, list) => {
assert.ifError(err);
assert.strictEqual(1, list.length);
assert.strictEqual(list.length, 1);
const fn = list[0];
assert.deepStrictEqual(filebuff, Buffer.from(fn, 'ucs2'));
assert.deepStrictEqual(Buffer.from(fn, 'ucs2'), filebuff);
assert.strictEqual(fn, filename);
}));

0 comments on commit 23d6932

Please sign in to comment.