We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8926fb4 commit dafb734Copy full SHA for dafb734
.github/workflows/scripts/__tests__/format.test.ts
@@ -9,7 +9,7 @@ describe('format utils', () => {
9
10
it('should format size in MB when greater than or equal to 1024 bytes', () => {
11
const size = 2.5 * 1024; // 2.5 KB -> will be shown in MB
12
- expect(formatSize(size)).toBe('0.00 MB');
+ expect(formatSize(size)).toBe('2.50 KB');
13
});
14
15
it('should handle small sizes', () => {
.github/workflows/scripts/utils/format.js
@@ -4,7 +4,7 @@
4
* @returns {string} Formatted size string with units
5
*/
6
function formatSize(sizeInBytes) {
7
- const MB_THRESHOLD = 1024;
+ const MB_THRESHOLD = 10 * 1024;
8
if (sizeInBytes >= MB_THRESHOLD) {
return `${(sizeInBytes / (1024 * 1024)).toFixed(2)} MB`;
}
0 commit comments