Files
Genarrative/src/services/storyEngine/actPlanner.test.ts
T
kdletters cbc27bad4a
CI / verify (push) Has been cancelled
init with react+axum+spacetimedb
2026-04-26 18:06:23 +08:00

27 lines
692 B
TypeScript

import { describe, expect, it } from 'vitest';
import { resolveCurrentActState } from './actPlanner';
describe('actPlanner', () => {
it('maps chapter stages to act states', () => {
const actState = resolveCurrentActState({
state: {
storyEngineMemory: {
activeThreadIds: ['thread-1'],
},
} as never,
chapterState: {
id: 'chapter-1',
title: '封桥旧案·高潮',
theme: '封桥旧案',
primaryThreadIds: ['thread-1'],
stage: 'climax',
chapterSummary: '旧案被逼到台前。',
},
});
expect(actState?.actIndex).toBe(2);
expect(actState?.status).toBe('finale');
});
});