refactor(simbolo): extraer la geometría del ≡ a lib/simbolo.ts
This commit is contained in:
1 parent
e76c492c3f
commit
fcd58fe00d
3 files changed
+43
-5
No files matched your search
@@ -0,0 +1,19 @@
|
||||
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]);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user