fix(bench press): Don’t use unicode in console reporter to prevent problems
This commit is contained in:
parent
8541cfd26d
commit
5cbb174a6d
|
@ -84,7 +84,9 @@ export class ConsoleReporter extends Reporter {
|
|||
var mean = Statistic.calculateMean(sample);
|
||||
var cv = Statistic.calculateCoefficientOfVariation(sample, mean);
|
||||
var formattedCv = NumberWrapper.isNaN(cv) ? 'NaN' : Math.floor(cv);
|
||||
return `${ConsoleReporter._formatNum(mean)}\u00B1${formattedCv}%`;
|
||||
// Note: Don't use the unicode character for +- as it might cause
|
||||
// hickups consoles...
|
||||
return `${ConsoleReporter._formatNum(mean)}+-${formattedCv}%`;
|
||||
})
|
||||
);
|
||||
return PromiseWrapper.resolve(null);
|
||||
|
|
|
@ -92,7 +92,7 @@ export function main() {
|
|||
})]);
|
||||
expect(log).toEqual([
|
||||
'======== | ========',
|
||||
'4.00±25% | 7.50±20%'
|
||||
'4.00+-25% | 7.50+-20%'
|
||||
]);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue