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