import { describe, it, expect, beforeAll } from 'vitest'; import { resetDb, withClient } from '../helpers/db.js'; import { migrateUp } from '../../lib/db/migrate.js'; describe('migration 005 — cross', () => { beforeAll(async () => { await resetDb(); await migrateUp(); }); it('creates tags, entity_tags, entity_links, attachments', async () => { await withClient(async (c) => { for (const t of ['tags','entity_tags','entity_links','attachments']) { const { rows } = await c.query(`SELECT to_regclass('public.' || $1) AS t;`, [t]); expect(rows[0].t).toBe(t); } }); }); });