mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-04 10:42:23 +00:00
12 lines
364 B
PHP
12 lines
364 B
PHP
<?php
|
|
|
|
it('formats latency in ms, s, or min', function (float|int|null $input, string $expected) {
|
|
expect(formatLatency($input))->toBe($expected);
|
|
})->with([
|
|
'null' => [null, '0.0 ms'],
|
|
'milliseconds' => [85.44, '85.4 ms'],
|
|
'just below a second' => [999.9, '999.9 ms'],
|
|
'seconds' => [2_450, '2.5 s'],
|
|
'minutes' => [312_000, '5.2 min'],
|
|
]);
|