Files
Genarrative/src/services/storyEngine/setpieceDirector.test.ts
T
kdletters 071faa482c 统一 Rust 与 TypeScript 格式化门禁
纳入 AGC Cargo workspace 的统一 rustfmt 检查与格式化入口

完成项目 TypeScript/Prettier 与 Rust 全量格式化

修复 Pingora expected executable 门禁的空白敏感误报

同步开发运维文档与 AGC skill pack 格式化忽略规则
2026-09-01 16:28:34 +08:00

40 lines
1018 B
TypeScript

import { describe, expect, it } from 'vitest';
import type { ChapterState } from '../../types';
import {
buildSetpieceDirective,
evaluateSetpieceOpportunity,
} from './setpieceDirector';
describe('setpieceDirector', () => {
it('creates setpiece directives for climax chapters', () => {
const chapterState: ChapterState = {
id: 'chapter-1',
title: '封桥旧案·高潮',
theme: '封桥旧案',
primaryThreadIds: ['thread-1'],
stage: 'climax',
chapterSummary: '旧案被逼到台前。',
};
expect(
evaluateSetpieceOpportunity({
state: {
currentScenePreset: { id: 'scene-1', currentPressureLevel: 'high' },
} as never,
chapterState,
journeyBeat: null,
}),
).toBe(true);
expect(
buildSetpieceDirective({
state: {
currentScenePreset: { id: 'scene-1' },
} as never,
chapterState,
journeyBeat: null,
})?.setpieceType,
).toBe('climax');
});
});