import { describe, expect, it } from 'vitest';
import { matchesTriggerWord, tagCooldownKey } from './tag-helpers.js';

describe('tagCooldownKey', () => {
  it('builds a stable redis key', () => {
    expect(tagCooldownKey('g1', 't1', 'c1')).toBe('tag:cooldown:g1:t1:c1');
  });
});

describe('matchesTriggerWord', () => {
  it('matches whole words case-insensitively', () => {
    expect(matchesTriggerWord('Hello world', 'hello')).toBe(true);
    expect(matchesTriggerWord('say helloworld', 'hello')).toBe(false);
  });
});
