feat(state): story trigger orchestration and auto-open rules
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { content } from '../../content';
|
||||
import { createGameState } from '../../engine/game';
|
||||
import { initStory } from '../../engine/story';
|
||||
import { getPrefs } from '../prefs';
|
||||
import { processStoryTriggers } from '../storyOrchestration';
|
||||
|
||||
describe('processStoryTriggers()', () => {
|
||||
it('returns entered nodes on boot', () => {
|
||||
const state = createGameState(content);
|
||||
initStory(state, content);
|
||||
const result = processStoryTriggers(state, content, { reason: 'boot' }, getPrefs());
|
||||
expect(result.enteredNodeIds.length).toBeGreaterThan(0);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user