Skip to content
Permalink
Browse files

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>
  • Loading branch information
jfarseneau-wb authored and MylesBorins committed Oct 12, 2018
1 parent ac70ab0 commit a8a30a91677a69a3fecdc7aa082dc2287e34fa3c
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/parallel/test-fs-readdir-ucs2.js
@@ -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 a8a30a9

Please sign in to comment.
You can’t perform that action at this time.