mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-20 16:53:33 +00:00
Co-authored-by: Mikael Finstad <finstaden@gmail.com> Co-authored-by: Nick Rutten <2504906+nickrttn@users.noreply.github.com> Co-authored-by: Murderlon <merlijn@soverin.net> Co-authored-by: Artur Paikin <artur@arturpaikin.com>
17 lines
383 B
TypeScript
17 lines
383 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import toArray from './toArray.ts'
|
|
|
|
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'])
|
|
})
|
|
})
|