refactor: fixes to custom field

This commit is contained in:
Carlos Valente
2025-07-11 16:49:41 +02:00
parent 4d419c0877
commit d8c1c38123
20 changed files with 103 additions and 108 deletions
@@ -101,21 +101,21 @@ describe('safeMerge', () => {
it('merges customFields into existing object', () => {
const existing = {
customFields: {
lighting: { type: 'string', label: 'lighting' },
sound: { type: 'string', label: 'sound' },
lighting: { type: 'text', label: 'lighting' },
sound: { type: 'text', label: 'sound' },
},
};
const newData = {
customFields: {
switcher: { type: 'string', label: 'switcher' },
vfx: { type: 'string', label: 'vfx' },
switcher: { type: 'text', label: 'switcher' },
vfx: { type: 'text', label: 'vfx' },
},
};
const expected = {
switcher: { type: 'string', label: 'switcher' },
vfx: { type: 'string', label: 'vfx' },
switcher: { type: 'text', label: 'switcher' },
vfx: { type: 'text', label: 'vfx' },
};
//@ts-expect-error -- testing partial merge