Files
Genarrative/src/services/storyEngine/playthroughMatrixLab.test.ts
kdletters cbc27bad4a
Some checks failed
CI / verify (push) Has been cancelled
init with react+axum+spacetimedb
2026-04-26 18:06:23 +08:00

35 lines
989 B
TypeScript

import { describe, expect, it } from 'vitest';
import { buildMatrixSummary, runPlaythroughMatrix } from './playthroughMatrixLab';
describe('playthroughMatrixLab', () => {
it('runs multiple deterministic simulations and summarizes them', () => {
const results = runPlaythroughMatrix({
scenarioPackId: 'scenario-1',
campaignPack: {
id: 'campaign-1',
scenarioPackId: 'scenario-1',
title: 'Campaign',
authoringStyle: 'classic',
campaignStateSeed: {
id: 'campaign-state',
title: 'Campaign',
currentActId: 'act-1',
currentActIndex: 0,
},
actTemplates: [],
requiredCompanionIds: [],
},
memory: {
activeThreadIds: ['thread-1'],
companionResolutions: [],
endingState: null,
} as never,
seeds: ['a', 'b', 'c'],
});
expect(results).toHaveLength(3);
expect(buildMatrixSummary(results)).toContain('3 条');
});
});