benchmark: change assert() to assert.ok()

PR-URL: https://github.com/nodejs/node/pull/54254
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Rafael Gonzaga authored and Michaël Zasso committed 2024-08-14 08:36:57 +02:00
1 parent e676d98435
commit 1be0ee76ef
8 files changed
+10 -10

No files matched your search

+1 -1
View File
@@ -45,7 +45,7 @@ function main({ n, type, method }) {
}
}
bench.end(n);
assert(hasError);
assert.ok(hasError);
break;
}
default:
+1 -1
View File
@@ -41,7 +41,7 @@ function main({ n, type }) {
}
}
bench.end(n);
assert(hasError);
assert.ok(hasError);
break;
}
default:
+2 -2
View File
@@ -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;
}
@@ -45,7 +45,7 @@ function main({ n, type }) {
}
}
bench.end(n);
assert(hasError);
assert.ok(hasError);
break;
}
default:
+1 -1
View File
@@ -49,7 +49,7 @@ function main({ n, type }) {
}
bench.end(n);
assert(hasError);
assert.ok(hasError);
break;
}
default:
+1 -1
View File
@@ -23,7 +23,7 @@ function main({ n, type }) {
}
}
bench.end(n);
assert(hasError);
assert.ok(hasError);
break;
}
case 'valid': {
+1 -1
View File
@@ -42,7 +42,7 @@ function main({ n, type }) {
}
}
bench.end(n);
assert(hasError);
assert.ok(hasError);
break;
}
default:
+2 -2
View File
@@ -30,7 +30,7 @@ function main({ n, type }) {
}
bench.end(n);
assert(result);
assert.ok(result);
fs.closeSync(fd);
break;
case 'invalid': {
@@ -46,7 +46,7 @@ function main({ n, type }) {
}
bench.end(n);
assert(hasError);
assert.ok(hasError);
break;
}
default:
+1 -1
View File
@@ -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,