镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Commit 23d6932

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 d590aa8 commit 23d6932

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎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)