mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
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:
1 parent
e676d98435
commit
1be0ee76ef
8 files changed
+10
-10
No files matched your search
@@ -45,7 +45,7 @@ function main({ n, type, method }) {
|
||||
}
|
||||
}
|
||||
bench.end(n);
|
||||
assert(hasError);
|
||||
assert.ok(hasError);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
@@ -41,7 +41,7 @@ function main({ n, type }) {
|
||||
}
|
||||
}
|
||||
bench.end(n);
|
||||
assert(hasError);
|
||||
assert.ok(hasError);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -49,7 +49,7 @@ function main({ n, type }) {
|
||||
}
|
||||
|
||||
bench.end(n);
|
||||
assert(hasError);
|
||||
assert.ok(hasError);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
@@ -23,7 +23,7 @@ function main({ n, type }) {
|
||||
}
|
||||
}
|
||||
bench.end(n);
|
||||
assert(hasError);
|
||||
assert.ok(hasError);
|
||||
break;
|
||||
}
|
||||
case 'valid': {
|
||||
|
||||
@@ -42,7 +42,7 @@ function main({ n, type }) {
|
||||
}
|
||||
}
|
||||
bench.end(n);
|
||||
assert(hasError);
|
||||
assert.ok(hasError);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user