31 lines
861 B
TypeScript
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);
|
|
});
|
|
});
|