UNPKG

ih-pagelet-financial-aid

Version:

PS Financial Aid Pagelet

28 lines (18 loc) 594 B
jest.dontMock('../src/Util.js'); var Util = require('../src/Util.js'); describe('toArray', () => { it('test object to array', () => { const object = {'prop1': 'value1'}; const expected = [object]; const actual = Util.toArray(object); expect(actual[0]).toBe(expected[0]); expect(actual.length).toBe(expected.length); }); it('test array', () => { const object = {'prop1': 'value1'}; const expected = [object]; const actual = Util.toArray([object]); expect(actual[0]).toBe(expected[0]); expect(actual.length).toBe(expected.length); }); });