mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-16 12:53:32 +00:00
refactor: create transaction system and apply to adding entry (#1620)
* refactor: create transaction system and apply to adding entry * refactor: migrate edit mutations to transaction * refactor: migrate delete mutation to transaction * refactor: migrate reorder mutation to transaction * refactor: migrate apply delay to transaction * refactor: migrate swapEvents to transaction * refactor: migrate clone to transaction * refactor: migrate group/ungroup transactions * refactor: simplify mutations * refactor: migrate getters * chore: add tests to processRundown()
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
import { PlayableEvent, Playback, TimerPhase } from 'ontime-types';
|
||||
|
||||
import { initRundown } from '../../services/rundown-service/RundownService.js';
|
||||
import {
|
||||
makeOntimeBlock,
|
||||
makeOntimeEvent,
|
||||
makeRundown,
|
||||
} from '../../services/rundown-service/__mocks__/rundown.mocks.js';
|
||||
import { makeOntimeBlock, makeOntimeEvent, makeRundown } from '../../api-data/rundown/__mocks__/rundown.mocks.js';
|
||||
import { initRundown } from '../../api-data/rundown/rundown.service.js';
|
||||
|
||||
import {
|
||||
type RuntimeState,
|
||||
@@ -71,18 +67,6 @@ beforeAll(() => {
|
||||
});
|
||||
|
||||
describe('mutation on runtimeState', () => {
|
||||
beforeEach(async () => {
|
||||
clearState();
|
||||
vi.mock('../../services/rundown-service/RundownService.js', async (importOriginal) => {
|
||||
const actual = (await importOriginal()) as object;
|
||||
|
||||
return {
|
||||
...actual,
|
||||
initRunddown: vi.fn().mockReturnValue(undefined),
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
vi.clearAllMocks();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user