mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-16 04:43:35 +00:00
refactor: fixes to custom field
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user