feat: agregar funciones code, section y bullets y pruebas
Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>webui
parent
eeccfa6234
commit
b19336659c
@ -0,0 +1,19 @@
|
|||||||
|
import { describe, it, expect } from 'bun:test';
|
||||||
|
import { code, section, bullets } from '../../../src/utils/formatting';
|
||||||
|
|
||||||
|
describe('utils/formatting helpers', () => {
|
||||||
|
it('code envuelve en backticks', () => {
|
||||||
|
expect(code('abc')).toBe('`abc`');
|
||||||
|
expect(code('')).toBe('``');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('section devuelve mayúsculas en negrita', () => {
|
||||||
|
expect(section('Comandos básicos')).toBe('*COMANDOS BÁSICOS*');
|
||||||
|
expect(section('web')).toBe('*WEB*');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('bullets genera lista con guiones', () => {
|
||||||
|
expect(bullets(['uno', 'dos'])).toBe('- uno\n- dos');
|
||||||
|
expect(bullets([])).toBe('');
|
||||||
|
});
|
||||||
|
});
|
||||||
Loading…
Reference in New Issue