Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

396 B
Raw Blame
import { describe, expect, it } from 'vitest';

import { matchRegex } from '../regex';

describe('matchRegex', () => {
  it('should pass when pattern matches', () => {
    expect(matchRegex('answer: 42', { pattern: '\\d+' } as any).passed).toBe(true);
  });

  it('should fail when no match', () => {
    expect(matchRegex('no numbers', { pattern: '\\d+' } as any).passed).toBe(false);
  });
});