import { describe, expect, it } from 'vitest'; import { View } from '../../src/domain/view.js'; describe('View', () => { it('construit avec props minimales', () => { const v = new View({ id: 1, name: 'Tous', type: 'grid', tableId: 5 }); expect(v.id).toBe(1); expect(v.name).toBe('Tous'); expect(v.type).toBe('grid'); expect(v.tableId).toBe(5); }); it('accepte un type custom (string libre)', () => { const v = new View({ id: 1, name: 'Custom', type: 'mystery_view', tableId: 5 }); expect(v.type).toBe('mystery_view'); }); });