24 lines
693 B
TypeScript
24 lines
693 B
TypeScript
import { describe, expect, it } from 'vitest';
|
|
|
|
import { buildAuthorialConstraintPack } from './authorialConstraintPack';
|
|
|
|
describe('authorialConstraintPack', () => {
|
|
it('builds authorial rules from profile context', () => {
|
|
const pack = buildAuthorialConstraintPack({
|
|
profile: {
|
|
coreConflicts: ['封桥旧案再起'],
|
|
themePack: {
|
|
toneRange: ['紧张', '克制'],
|
|
},
|
|
storyGraph: {
|
|
visibleThreads: [{ title: '封桥旧案' }],
|
|
scars: [{ title: '断桥旧痕' }],
|
|
},
|
|
} as never,
|
|
});
|
|
|
|
expect(pack.toneRules).toContain('紧张');
|
|
expect(pack.requiredPayoffs).toContain('封桥旧案');
|
|
});
|
|
});
|