mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-23 18:29:09 +00:00
And rewrite all the require calls. ```bash git mv src/utils/* packages/@uppy/utils/src sed -i 's/[./]*\/utils\//@uppy\/utils\/lib\//' src/**/*.js # transform (../)*utils → @uppy/utils ```
11 lines
326 B
JavaScript
11 lines
326 B
JavaScript
const getBytesRemaining = require('./getBytesRemaining')
|
|
|
|
describe('getBytesRemaining', () => {
|
|
it('should calculate the bytes remaining given a fileProgress object', () => {
|
|
const fileProgress = {
|
|
bytesUploaded: 1024,
|
|
bytesTotal: 3096
|
|
}
|
|
expect(getBytesRemaining(fileProgress)).toEqual(2072)
|
|
})
|
|
})
|