mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-24 10:47:44 +00:00
* 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
22 lines
374 B
JavaScript
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'
|
|
])
|
|
})
|
|
})
|