feat(migrate): CLI dispatch + verify
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
15
tests/migrate/verify.test.js
Normal file
15
tests/migrate/verify.test.js
Normal file
@@ -0,0 +1,15 @@
|
||||
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);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user