You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
786 B
TypeScript
24 lines
786 B
TypeScript
import { describe, it, expect } from 'bun:test';
|
|
import { CommandService } from '../../../src/services/command';
|
|
|
|
describe('CommandService - comando desconocido devuelve ayuda rápida', () => {
|
|
it('responde con encabezado y CTA a /t ayuda incluyendo quick help', async () => {
|
|
const res = await CommandService.handle({
|
|
sender: '600000001',
|
|
groupId: '',
|
|
message: '/t qué tareas tengo hoy?',
|
|
mentions: [],
|
|
});
|
|
|
|
expect(Array.isArray(res)).toBe(true);
|
|
expect(res.length).toBeGreaterThan(0);
|
|
const msg = res[0].message;
|
|
|
|
expect(msg).toContain('COMANDO NO RECONOCIDO');
|
|
expect(msg).toContain('/t ayuda');
|
|
expect(msg).toContain('/t ver mis');
|
|
expect(msg).toContain('/t web');
|
|
expect(msg).toContain('/t configurar');
|
|
});
|
|
});
|