mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* Refactor testing harness to use defaults
- Move tests into defaultly named test folders
- Use default test suffix of ".test" instead of "_test"
- Make cluster-store tests unit tests by adding more
nesting, so that order of tests doesn't matter
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Co-authored-by: Sebastian Malton <smalton@mirantis.com>
15 lines
415 B
TypeScript
15 lines
415 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);
|
|
});
|
|
}); |