/
githubmirror
/
angular-cli
Обзор
Документация
Войти
/
githubmirror
/
angular-cli
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/angular/build/src/utils/format-bytes_spec.ts
27 строк
684 B
Ash Ramirez
refactor(@angular/cli): update aio links -> adev links
06 июн 2024, 12:12
06 июн 2024, 12:12
434a374
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { formatSize } from './format-bytes'; describe('formatSize', () => { it('1000 bytes to be 1kB', () => { expect(formatSize(1000)).toBe('1.00 kB'); }); it('1_000_000 bytes to be 1MB', () => { expect(formatSize(1_000_000)).toBe('1.00 MB'); }); it('1_500_000 bytes to be 1.5MB', () => { expect(formatSize(1_500_000)).toBe('1.50 MB'); }); it('1_000_000_000 bytes to be 1GB', () => { expect(formatSize(1_000_000_000)).toBe('1.00 GB'); }); });