Files
directus/packages/shared/tests/utils/to-array.test.ts
2022-05-27 12:43:54 -04:00

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