Files
Void-Homelab/tests/migrate/verify.test.js
root 332a0158a0 feat(migrate): CLI dispatch + verify
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 22:21:48 +10:00

16 lines
638 B
JavaScript

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);
});
});