mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-01 04:19:12 +00:00
refactor: simplify custom field shape
This commit is contained in:
committed by
Carlos Valente
parent
cf14b0b427
commit
c4136a0ec7
@@ -304,15 +304,15 @@ describe('generate()', () => {
|
||||
type: SupportedEvent.Event,
|
||||
id: '1',
|
||||
custom: {
|
||||
lighting: { value: 'event 1 lx' },
|
||||
lighting: 'event 1 lx',
|
||||
} as EventCustomFields,
|
||||
} as OntimeEvent,
|
||||
{
|
||||
type: SupportedEvent.Event,
|
||||
id: '2',
|
||||
custom: {
|
||||
lighting: { value: 'event 2 lx' },
|
||||
sound: { value: 'event 2 sound' },
|
||||
lighting: 'event 2 lx',
|
||||
sound: 'event 2 sound',
|
||||
} as EventCustomFields,
|
||||
} as OntimeEvent,
|
||||
];
|
||||
@@ -322,10 +322,10 @@ describe('generate()', () => {
|
||||
lighting: ['1', '2'],
|
||||
sound: ['2'],
|
||||
});
|
||||
expect((initResult.rundown['1'] as OntimeEvent).custom).toMatchObject({ lighting: { value: 'event 1 lx' } });
|
||||
expect((initResult.rundown['1'] as OntimeEvent).custom).toMatchObject({ lighting: 'event 1 lx' });
|
||||
expect((initResult.rundown['2'] as OntimeEvent).custom).toMatchObject({
|
||||
lighting: { value: 'event 2 lx' },
|
||||
sound: { value: 'event 2 sound' },
|
||||
lighting: 'event 2 lx',
|
||||
sound: 'event 2 sound',
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user