uppy/packages/@uppy/utils/src/toArray.test.js
Renée Kooi c62ec3665d Update eslint to v6 (#1777)
* Update eslint

* Do eslint --fix

* Do not access Object.prototype method 'hasOwnProperty' from target object

* utils: add hasProperty

* eslint --fix

* Disable quote-props for locale files

* add back quotes in locale files

* revert locale files to state on master

* Update react-scripts
2019-08-13 21:45:30 +03:00

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