Files
Creeer-Web/components/primitives/__tests__/simbolo.test.ts
T

20 lines
667 B
TypeScript

import { describe, it, expect } from 'vitest';
import { BARRAS_SIMBOLO, LINEAS_SIMBOLO } from '@/lib/simbolo';
describe('geometría del ≡', () => {
it('define exactly the three bars of the mark', () => {
expect(BARRAS_SIMBOLO).toHaveLength(3);
});
it('keeps the three bars aligned and equal in width', () => {
const anchos = new Set(BARRAS_SIMBOLO.map((b) => b.width));
const izquierdas = new Set(BARRAS_SIMBOLO.map((b) => b.x));
expect(anchos.size).toBe(1);
expect(izquierdas.size).toBe(1);
});
it('derives stroke lines through each bar centre', () => {
expect(LINEAS_SIMBOLO.map((l) => l.y1)).toEqual([17, 32, 47]);
});
});