mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-23 02:08:30 +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 ```
22 lines
384 B
JavaScript
22 lines
384 B
JavaScript
const toArray = require('./toArray')
|
|
|
|
describe('toArray', () => {
|
|
it('should convert a array-like object into an array', () => {
|
|
const obj = {
|
|
'0': 'zero',
|
|
'1': 'one',
|
|
'2': 'two',
|
|
'3': 'three',
|
|
'4': 'four',
|
|
length: 5
|
|
}
|
|
|
|
expect(toArray(obj)).toEqual([
|
|
'zero',
|
|
'one',
|
|
'two',
|
|
'three',
|
|
'four'
|
|
])
|
|
})
|
|
})
|