import { describe, it, expect, beforeAll } from 'vitest'; import { resetDb } from '../helpers/db.js'; import { migrateUp } from '../../lib/db/migrate.js'; import * as map from '../../lib/db/repos/migration_map.js'; import { verify } from '../../migrate/verify.js'; import { randomUUID } from 'crypto'; beforeAll(async () => { await resetDb(); await migrateUp(); await map.record('plans', 'a.md', 'page', randomUUID()); }); describe('verify', () => { it('reports per-source/type counts', async () => { const out = await verify(); expect(out.map.find(r => r.source === 'plans' && r.entity_type === 'page').n).toBe(1); }); });