This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
packwatch/tests/utils.test.ts

12 lines
358 B
TypeScript

import { convertSizeToBytes } from '../src/utils'
describe('utils', () => {
it.each`
initialSize | expectedSize
${'1 B'} | ${1}
${'1 kB'} | ${1000}
${'1 mB'} | ${1000000}
`('converts sizes properly ($initialSize -> $expectedSize)', ({ initialSize, expectedSize }) => {
expect(convertSizeToBytes(initialSize)).toEqual(expectedSize)
})
})