Files
probo/packages/helpers/src/file.test.ts
Jonathan 7cb84d8ce8 Add vendor compliance report tab
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2025-06-13 13:23:42 -07:00

14 lines
459 B
TypeScript

import { describe, it, expect } from "vitest";
import { isEmpty } from "./array";
import { fileSize } from "./file";
describe("file", () => {
it("should display a file size in a human readable format", () => {
const fakeTranslator = (s: string) => s;
expect(fileSize(fakeTranslator, 4911)).toMatchInlineSnapshot(
`"4.8 KB"`,
);
expect(fileSize(fakeTranslator, 20)).toMatchInlineSnapshot(`"20 B"`);
});
});