31 lines
934 B
TypeScript
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('并肩到底');
|
|
});
|
|
});
|