Files
Genarrative/src/services/storyEngine/playerStyleProfiler.test.ts
kdletters cbc27bad4a
Some checks failed
CI / verify (push) Has been cancelled
init with react+axum+spacetimedb
2026-04-26 18:06:23 +08:00

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);
});
});