refactor: 将 formatFileSize 重命名为 formatBytes 并移至通用工具模块

This commit is contained in:
雨霖铃
2026-06-10 00:32:29 +08:00
parent 3f73adc015
commit 355a94d116
4 changed files with 8 additions and 28 deletions
@@ -27,7 +27,7 @@ describe('DecodeResultPaper 组件', () => {
expect(screen.getByText(/image\/png/)).toBeInTheDocument();
});
it('应通过 formatFileSize 渲染文件大小', () => {
it('应通过 formatBytes 渲染文件大小', () => {
render(<DecodeResultPaper {...{ ...defaultProps, blobSize: 1536 }} />);
expect(screen.getByText(/1\.5 KB/)).toBeInTheDocument();
});