Skip to content

Commit

Permalink
benchmark: change assert() to assert.ok()
Browse files Browse the repository at this point in the history
PR-URL: #54254
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
RafaelGSS authored and targos committed Aug 14, 2024
1 parent e676d98 commit 1be0ee7
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion benchmark/fs/bench-chownSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function main({ n, type, method }) {
}
}
bench.end(n);
assert(hasError);
assert.ok(hasError);
break;
}
default:
Expand Down
2 changes: 1 addition & 1 deletion benchmark/fs/bench-linkSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function main({ n, type }) {
}
}
bench.end(n);
assert(hasError);
assert.ok(hasError);
break;
}
default:
Expand Down
4 changes: 2 additions & 2 deletions benchmark/fs/bench-readlinkSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function main({ n, type }) {
returnValue = fs.readlinkSync(tmpdir.resolve(`.readlink-sync-${i}`), { encoding: 'utf8' });
}
bench.end(n);
assert(returnValue);
assert.ok(returnValue);
break;
}

Expand All @@ -45,7 +45,7 @@ function main({ n, type }) {
}
}
bench.end(n);
assert(hasError);
assert.ok(hasError);
break;
}
default:
Expand Down
2 changes: 1 addition & 1 deletion benchmark/fs/bench-readvSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function main({ n, type }) {
}

bench.end(n);
assert(hasError);
assert.ok(hasError);
break;
}
default:
Expand Down
2 changes: 1 addition & 1 deletion benchmark/fs/bench-renameSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function main({ n, type }) {
}
}
bench.end(n);
assert(hasError);
assert.ok(hasError);
break;
}
case 'valid': {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/fs/bench-symlinkSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function main({ n, type }) {
}
}
bench.end(n);
assert(hasError);
assert.ok(hasError);
break;
}
default:
Expand Down
4 changes: 2 additions & 2 deletions benchmark/fs/bench-writevSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function main({ n, type }) {
}

bench.end(n);
assert(result);
assert.ok(result);
fs.closeSync(fd);
break;
case 'invalid': {
Expand All @@ -46,7 +46,7 @@ function main({ n, type }) {
}

bench.end(n);
assert(hasError);
assert.ok(hasError);
break;
}
default:
Expand Down
2 changes: 1 addition & 1 deletion benchmark/fs/read-stream-throughput.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function main(conf) {
}

function runTest(filesize, highWaterMark, encoding, n) {
assert(fs.statSync(filename).size === filesize * n);
assert.strictEqual(fs.statSync(filename).size, filesize * n);
const rs = fs.createReadStream(filename, {
highWaterMark,
encoding,
Expand Down

0 comments on commit 1be0ee7

Please sign in to comment.