mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
16 lines
416 B
TypeScript
16 lines
416 B
TypeScript
import { metricUnitsToNumber } from "../metricUnitsToNumber";
|
|
|
|
describe("metricUnitsToNumber tests", () => {
|
|
test("plain number", () => {
|
|
expect(metricUnitsToNumber("124")).toStrictEqual(124);
|
|
});
|
|
|
|
test("with k suffix", () => {
|
|
expect(metricUnitsToNumber("124k")).toStrictEqual(124000);
|
|
});
|
|
|
|
test("with m suffix", () => {
|
|
expect(metricUnitsToNumber("124m")).toStrictEqual(124000000);
|
|
});
|
|
});
|