Skip to content

Commit 4a1a327

Browse files
committed
improve test
1 parent 35c2e84 commit 4a1a327

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

test/performance/base.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ function round3(value) {
88
export class PerformanceBase {
99
constructor(
1010
TRYES,
11+
title = 'Performance test',
1112
log = console.log,
1213
) {
1314
this.TRYES = TRYES;
1415
this.log = log;
15-
this.log(chalk.bold('Performance test, TRYES:'), TRYES);
16+
this.log(chalk.bold(title), 'TRYES:', TRYES);
1617
}
1718

1819
start(

test/performance/base64.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const b64Arr = [72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100];
5050
}
5151

5252
{
53-
function equal(a, b) {
53+
const equal = (a, b) => {
5454
if (a.length !== b.length) return false;
5555
for (let i = 0; i < a.length; i++) {
5656
if (a[i] !== b[i]) return false;
@@ -69,7 +69,7 @@ const b64Arr = [72, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100];
6969
test.end();
7070
}
7171
{
72-
function equal(a, b) {
72+
const equal = (a, b) => {
7373
if (a.length !== b.length) return false;
7474
return a.every((v, i) => v === b[i]);
7575
}

0 commit comments

Comments
 (0)