17 lines
706 B
TypeScript
17 lines
706 B
TypeScript
import { describe, expect, it } from 'vitest';
|
|
|
|
import { buildPlayerStyleProfile, updatePlayerStyleProfileFromAction } from './playerStyleProfiler';
|
|
|
|
describe('playerStyleProfiler', () => {
|
|
it('builds defaults and updates style from actions', () => {
|
|
const profile = buildPlayerStyleProfile({ storyEngineMemory: {} } as never);
|
|
const next = updatePlayerStyleProfileFromAction({
|
|
current: profile,
|
|
actionText: '我想先和同伴聊聊,再去观察周围残痕',
|
|
});
|
|
|
|
expect(next.preferenceWeights.companion).toBeGreaterThan(profile.preferenceWeights.companion);
|
|
expect(next.preferenceWeights.exploration).toBeGreaterThan(profile.preferenceWeights.exploration);
|
|
});
|
|
});
|