chore: added tests and removed restart phase

this version also has recursive goals functional
This commit is contained in:
Pim Hutting
2026-01-22 10:15:20 +01:00
parent 883f0a95a6
commit f73bbb9d02
7 changed files with 96 additions and 66 deletions

View File

@@ -1,8 +1,7 @@
import { renderHook, act, cleanup } from '@testing-library/react';
import {
sendAPICall,
nextPhase,
resetPhase,
nextPhase,
pauseExperiment,
playExperiment,
useExperimentLogger,
@@ -116,14 +115,6 @@ describe('MonitoringPageAPI', () => {
);
});
test('resetPhase sends correct params', async () => {
await resetPhase();
expect(globalThis.fetch).toHaveBeenCalledWith(
expect.any(String),
expect.objectContaining({ body: JSON.stringify({ type: 'reset_phase', context: '' }) })
);
});
test('pauseExperiment sends correct params', async () => {
await pauseExperiment();
expect(globalThis.fetch).toHaveBeenCalledWith(