uppy/packages/@uppy/utils/src/toArray.test.js
Renée Kooi 2e257b7e55
Move utils files to @uppy/utils package.
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
```
2018-06-14 16:31:19 +02:00

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'
])
})
})