mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-20 22:49:18 +00:00
refactor: swap maintains schedule
This commit is contained in:
@@ -203,6 +203,7 @@ describe('swapEventData', () => {
|
||||
duration: 1,
|
||||
delay: 1,
|
||||
revision: 3,
|
||||
currentBlock: null,
|
||||
} as OntimeEvent;
|
||||
const eventB = {
|
||||
id: '2',
|
||||
@@ -212,6 +213,7 @@ describe('swapEventData', () => {
|
||||
duration: 2,
|
||||
delay: 2,
|
||||
revision: 7,
|
||||
currentBlock: 'testing',
|
||||
} as OntimeEvent;
|
||||
|
||||
const [newA, newB] = swapEventData(eventA, eventB);
|
||||
@@ -223,7 +225,8 @@ describe('swapEventData', () => {
|
||||
timeEnd: 1,
|
||||
duration: 1,
|
||||
delay: 1,
|
||||
revision: 4,
|
||||
revision: 3,
|
||||
currentBlock: null,
|
||||
});
|
||||
expect(newB).toMatchObject({
|
||||
id: '2',
|
||||
@@ -232,7 +235,8 @@ describe('swapEventData', () => {
|
||||
timeEnd: 2,
|
||||
duration: 2,
|
||||
delay: 2,
|
||||
revision: 8,
|
||||
revision: 7,
|
||||
currentBlock: 'testing',
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user