Files
Genarrative/src/services/storyEngine/contentDiffReport.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

31 lines
861 B
TypeScript

import { describe, expect, it } from 'vitest';
import { buildContentDiffReport } from './contentDiffReport';
describe('contentDiffReport', () => {
it('reports differences between profile/campaign versions', () => {
const report = buildContentDiffReport({
previousProfile: {
summary: '旧摘要',
scenarioPackId: 'scenario-old',
campaignPackId: 'campaign-old',
} as never,
nextProfile: {
summary: '新摘要',
scenarioPackId: 'scenario-new',
campaignPackId: 'campaign-new',
} as never,
previousCampaignPack: {
authoringStyle: 'classic',
actTemplates: [],
} as never,
nextCampaignPack: {
authoringStyle: 'grim',
actTemplates: [{}, {}],
} as never,
});
expect(report.changedFields.length).toBeGreaterThan(0);
});
});