Files
household-bot/apps/bot/src/topic-history.test.ts

18 lines
784 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { describe, expect, test } from 'bun:test'
import { shouldLoadExpandedChatHistory } from './topic-history'
describe('shouldLoadExpandedChatHistory', () => {
test('recognizes broader russian dialogue-memory prompts', () => {
expect(shouldLoadExpandedChatHistory('У тебя есть контекст диалога?')).toBe(true)
expect(
shouldLoadExpandedChatHistory('Это вопрос, что я последнее купил, основываясь на диалоге?')
).toBe(true)
expect(shouldLoadExpandedChatHistory('Вопрос выше уже есть')).toBe(true)
})
test('stays false for ordinary purchase chatter', () => {
expect(shouldLoadExpandedChatHistory('Купил молоко за 6 лари')).toBe(false)
})
})