27 lines
692 B
TypeScript
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');
|
|
});
|
|
});
|