Rework story engine flow and reorganize project docs
Some checks failed
CI / verify (push) Has been cancelled
Some checks failed
CI / verify (push) Has been cancelled
This commit is contained in:
30
src/services/storyEngine/epilogueComposer.test.ts
Normal file
30
src/services/storyEngine/epilogueComposer.test.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
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('并肩到底');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user