diff --git a/field-logic/src/lib/engine.test.ts b/field-logic/src/lib/engine.test.ts index dcf3bb6..10c005d 100644 --- a/field-logic/src/lib/engine.test.ts +++ b/field-logic/src/lib/engine.test.ts @@ -60,6 +60,10 @@ describe('SurveyEngine', () => { engine = new SurveyEngine(mockSurvey, 'test_session'); }); + it('should throw an error if getCurrentNode is called before start', () => { + expect(() => engine.getCurrentNode()).toThrow('Survey not started'); + }); + it('should start at the first node', () => { const node = engine.start(); expect(node.id).toBe('start');