mirror of
https://github.com/directus/directus.git
synced 2026-01-25 11:08:05 -05:00
12 lines
364 B
TypeScript
12 lines
364 B
TypeScript
import { toArray } from '../../src/utils/to-array';
|
|
|
|
describe('toArray', () => {
|
|
it('takes in a string and returns an array', () => {
|
|
expect(toArray('1,2,3,4,5')).toStrictEqual(['1', '2', '3', '4', '5']);
|
|
});
|
|
|
|
it('when passed an array returns the array', () => {
|
|
expect(toArray(['1', '2', '3', '4', '5'])).toStrictEqual(['1', '2', '3', '4', '5']);
|
|
});
|
|
});
|