Files
directus/packages/shared/src/utils/to-array.test.ts
Jay Cammarano e7b4153028 Tests for listFolders, resolvePackage (#8356)
* listFolders test passing 100% coverage

* added tmp package

* listFolders test updated to use random temp folder

* add package tmp to workspace

* tmp as dev dependency

* direct imports

* resolve-packages passing 100% coverage

* fixed tmpdir location in list-folders

* Pin tmp

Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-09-28 19:10:08 -04:00

12 lines
350 B
TypeScript

import { toArray } from './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']);
});
});