Files
Genarrative/src/services/storyEngine/epilogueComposer.test.ts
高物 ddcb5d5c8c
Some checks failed
CI / verify (push) Has been cancelled
Rework story engine flow and reorganize project docs
2026-04-06 23:19:00 +08:00

31 lines
934 B
TypeScript

import { describe, expect, it } from 'vitest';
import { buildEpilogueSummary } from './epilogueComposer';
describe('epilogueComposer', () => {
it('composes an epilogue from ending and companion resolutions', () => {
const summary = buildEpilogueSummary({
endingState: {
id: 'ending-1',
title: '守住火种',
endingType: 'heroic',
summary: '你把局势拖回了可继续前行的方向。',
contributingThreadIds: ['thread-1'],
companionResolutions: [],
worldOutcomeSummary: '边城暂时稳了下来。',
},
companionResolutions: [
{
characterId: 'archer-hero',
resolutionType: 'bonded',
summary: '她最终选择与你并肩到底。',
relatedThreadIds: ['thread-1'],
},
],
});
expect(summary).toContain('守住火种');
expect(summary).toContain('并肩到底');
});
});