mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-08 20:30:53 -07:00
refactor: rename formatMemoryUsage to formatBytes (#14997)
Co-authored-by: Adib234 <30782825+Adib234@users.noreply.github.com>
This commit is contained in:
@@ -7,23 +7,23 @@
|
||||
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
|
||||
import {
|
||||
formatDuration,
|
||||
formatMemoryUsage,
|
||||
formatBytes,
|
||||
formatTimeAgo,
|
||||
stripReferenceContent,
|
||||
} from './formatters.js';
|
||||
|
||||
describe('formatters', () => {
|
||||
describe('formatMemoryUsage', () => {
|
||||
describe('formatBytes', () => {
|
||||
it('should format bytes into KB', () => {
|
||||
expect(formatMemoryUsage(12345)).toBe('12.1 KB');
|
||||
expect(formatBytes(12345)).toBe('12.1 KB');
|
||||
});
|
||||
|
||||
it('should format bytes into MB', () => {
|
||||
expect(formatMemoryUsage(12345678)).toBe('11.8 MB');
|
||||
expect(formatBytes(12345678)).toBe('11.8 MB');
|
||||
});
|
||||
|
||||
it('should format bytes into GB', () => {
|
||||
expect(formatMemoryUsage(12345678901)).toBe('11.50 GB');
|
||||
expect(formatBytes(12345678901)).toBe('11.50 GB');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user