This commit is contained in:
30
src/services/storyEngine/contentDiffReport.test.ts
Normal file
30
src/services/storyEngine/contentDiffReport.test.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user