2ec9c0e533
* build: ts-jest * build: yarn latest * build: no babel * chore: lint * refactor: test, types
15 lines
428 B
TypeScript
15 lines
428 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)
|
|
},
|
|
)
|
|
})
|