mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-25 17:09:09 +00:00
refactor: improve async handling
This commit is contained in:
committed by
Carlos Valente
parent
c65761448d
commit
891bda6661
@@ -39,29 +39,29 @@ describe('triggerAction()', () => {
|
||||
let oscSpy = vi.spyOn(oscClient, 'emitOSC');
|
||||
let httpSpy = vi.spyOn(httpClient, 'emitHTTP');
|
||||
|
||||
beforeEach(() => {
|
||||
beforeEach(async () => {
|
||||
oscSpy = vi.spyOn(oscClient, 'emitOSC').mockImplementation(() => {});
|
||||
httpSpy = vi.spyOn(httpClient, 'emitHTTP').mockImplementation(() => {});
|
||||
|
||||
deleteAllTriggers();
|
||||
const oscAutomation = addAutomation({
|
||||
await deleteAllTriggers();
|
||||
const oscAutomation = await addAutomation({
|
||||
title: 'test-osc',
|
||||
filterRule: 'all',
|
||||
filters: [],
|
||||
outputs: [makeOSCAction()],
|
||||
});
|
||||
const httpAutomation = addAutomation({
|
||||
const httpAutomation = await addAutomation({
|
||||
title: 'test-http',
|
||||
filterRule: 'any',
|
||||
filters: [],
|
||||
outputs: [makeHTTPAction()],
|
||||
});
|
||||
addTrigger({
|
||||
await addTrigger({
|
||||
title: 'test-osc',
|
||||
trigger: TimerLifeCycle.onLoad,
|
||||
automationId: oscAutomation.id,
|
||||
});
|
||||
addTrigger({
|
||||
await addTrigger({
|
||||
title: 'test-http',
|
||||
trigger: TimerLifeCycle.onFinish,
|
||||
automationId: httpAutomation.id,
|
||||
|
||||
Reference in New Issue
Block a user