43 lines
1.2 KiB
TypeScript
43 lines
1.2 KiB
TypeScript
import { describe, expect, it } from 'vitest';
|
|
|
|
import { resolveCompanionResolution } from './companionResolutionDirector';
|
|
|
|
describe('companionResolutionDirector', () => {
|
|
it('resolves companion endings from arcs and consequences', () => {
|
|
const resolution = resolveCompanionResolution({
|
|
state: {} as never,
|
|
arcState: {
|
|
characterId: 'archer-hero',
|
|
arcTheme: '旧案',
|
|
currentStage: 'conflicted',
|
|
activeConflictTags: ['旧案'],
|
|
pendingEventIds: [],
|
|
resolvedEventIds: [],
|
|
},
|
|
ledger: [
|
|
{
|
|
id: 'consequence-1',
|
|
category: 'companion',
|
|
title: '分歧',
|
|
summary: '她对这一步明显有保留。',
|
|
weight: 3,
|
|
relatedIds: ['archer-hero'],
|
|
irreversible: true,
|
|
},
|
|
],
|
|
reactions: [
|
|
{
|
|
id: 'reaction-1',
|
|
characterId: 'archer-hero',
|
|
reactionType: 'disapprove',
|
|
reason: '她对这一步明显有保留。',
|
|
relatedThreadIds: ['thread-1'],
|
|
createdAt: new Date().toISOString(),
|
|
},
|
|
],
|
|
});
|
|
|
|
expect(resolution.resolutionType).toBe('estranged');
|
|
});
|
|
});
|