import { formObjToObj } from '../../src/ts/mmui-form/form'; test('formObjToObj', () => { const formObj = { checkboxes: [ { value: '0', hasValue: () => true, hasDisplay: () => false, name: 'checkboxes', type: 'checkbox', checked: '', }, ], radio_buttons: { value: '0', hasValue: () => true, hasDisplay: () => false, name: 'radio_buttons', type: 'radio', checked: '', }, }; const obj = formObjToObj(formObj); expect(obj).toEqual({ checkboxes: ['0'], radio_buttons: '0', }); });