GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: fix arguments order in `assert.strictEqual` · nodejs/node@43bfb13

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-fs-write-buffer.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-fs-write-buffer.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-fs-write-buffer.js
+8-8Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ tmpdir.refresh();
3838
const cb = common.mustCall((err, written) => {
3939
assert.ifError(err);
4040

41-
assert.strictEqual(expected.length, written);
41+
assert.strictEqual(written, expected.length);
4242
fs.closeSync(fd);
4343

4444
const found = fs.readFileSync(filename, 'utf8');
45-
assert.strictEqual(expected.toString(), found);
45+
assert.strictEqual(found, expected.toString());
4646
});
4747

4848
fs.write(fd, expected, 0, expected.length, null, cb);
@@ -78,7 +78,7 @@ tmpdir.refresh();
7878
const cb = common.mustCall(function(err, written) {
7979
assert.ifError(err);
8080

81-
assert.strictEqual(expected.length, written);
81+
assert.strictEqual(written, expected.length);
8282
fs.closeSync(fd);
8383

8484
const found = fs.readFileSync(filename, 'utf8');
@@ -98,7 +98,7 @@ tmpdir.refresh();
9898
const cb = common.mustCall(function(err, written) {
9999
assert.ifError(err);
100100

101-
assert.strictEqual(expected.length, written);
101+
assert.strictEqual(written, expected.length);
102102
fs.closeSync(fd);
103103

104104
const found = fs.readFileSync(filename, 'utf8');
@@ -118,11 +118,11 @@ tmpdir.refresh();
118118
const cb = common.mustCall((err, written) => {
119119
assert.ifError(err);
120120

121-
assert.strictEqual(expected.length, written);
121+
assert.strictEqual(written, expected.length);
122122
fs.closeSync(fd);
123123

124124
const found = fs.readFileSync(filename, 'utf8');
125-
assert.strictEqual(expected.toString(), found);
125+
assert.strictEqual(found, expected.toString());
126126
});
127127

128128
fs.write(fd, expected, undefined, undefined, cb);
@@ -138,11 +138,11 @@ tmpdir.refresh();
138138
const cb = common.mustCall((err, written) => {
139139
assert.ifError(err);
140140

141-
assert.strictEqual(expected.length, written);
141+
assert.strictEqual(written, expected.length);
142142
fs.closeSync(fd);
143143

144144
const found = fs.readFileSync(filename, 'utf8');
145-
assert.strictEqual(expected.toString(), found);
145+
assert.strictEqual(found, expected.toString());
146146
});
147147

148148
fs.write(fd, Uint8Array.from(expected), cb);

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.