refactor: swap maintains schedule

This commit is contained in:
Carlos Valente
2025-03-28 21:35:23 +01:00
committed by arc-alex
parent ef73c87e2f
commit 84fac739f0
3 changed files with 14 additions and 2 deletions
@@ -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',
});
});
});