mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-11 02:13:48 +00:00
refactor: remove legacy service
This commit is contained in:
committed by
Carlos Valente
parent
1f71d4578c
commit
2cc434b0e9
@@ -35,18 +35,6 @@ describe('safeMerge', () => {
|
||||
lighting: { type: 'string', label: 'lighting', colour: 'red' },
|
||||
vfx: { type: 'string', label: 'vfx', colour: 'blue' },
|
||||
},
|
||||
osc: {
|
||||
portIn: 8888,
|
||||
portOut: 9999,
|
||||
targetIP: '127.0.0.1',
|
||||
enabledIn: false,
|
||||
enabledOut: false,
|
||||
subscriptions: [],
|
||||
},
|
||||
http: {
|
||||
enabledOut: false,
|
||||
subscriptions: [],
|
||||
},
|
||||
automation: {
|
||||
enabledAutomations: false,
|
||||
enabledOscIn: false,
|
||||
@@ -107,38 +95,6 @@ describe('safeMerge', () => {
|
||||
language: 'pt',
|
||||
});
|
||||
});
|
||||
it('merges the osc key', () => {
|
||||
const newData = {
|
||||
osc: {
|
||||
portIn: 7777,
|
||||
subscriptions: [
|
||||
{
|
||||
id: 'unique',
|
||||
cycle: 'onStart',
|
||||
message: 'new message',
|
||||
enabled: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
//@ts-expect-error -- testing partial merge
|
||||
const mergedData = safeMerge(existing, newData);
|
||||
expect(mergedData.osc).toMatchObject({
|
||||
portIn: 7777,
|
||||
portOut: 9999,
|
||||
targetIP: '127.0.0.1',
|
||||
enabledIn: false,
|
||||
enabledOut: false,
|
||||
subscriptions: [
|
||||
{
|
||||
id: 'unique',
|
||||
cycle: 'onStart',
|
||||
message: 'new message',
|
||||
enabled: true,
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
it('should merge the urlPresets key when present', () => {
|
||||
const existingData = {
|
||||
@@ -167,17 +123,12 @@ describe('safeMerge', () => {
|
||||
} as ViewSettings,
|
||||
urlPresets: [],
|
||||
customFields: {},
|
||||
osc: {
|
||||
portIn: 8888,
|
||||
portOut: 9999,
|
||||
targetIP: '127.0.0.1',
|
||||
enabledIn: false,
|
||||
enabledOut: false,
|
||||
subscriptions: [],
|
||||
},
|
||||
http: {
|
||||
enabledOut: false,
|
||||
subscriptions: [],
|
||||
automation: {
|
||||
enabledAutomations: false,
|
||||
enabledOscIn: false,
|
||||
oscPortIn: 8000,
|
||||
automations: [],
|
||||
blueprints: {},
|
||||
},
|
||||
} as DatabaseModel;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user