test(server): integration suites boot on the migrated schema snapshot

This commit is contained in:
jubnl
2026-09-21 10:13:40 +02:00
parent d7f39916d5
commit e846c91a16
48 changed files with 368 additions and 1239 deletions
+7
View File
@@ -27,4 +27,11 @@ export default defineConfig({
// itself, but the CLI and the migrator's logging still read it, and naming a
// different file here than the one actually open is a trap.
dbName: resolveDbPath(),
// MikroORM loads migrations and seeders through its own dynamic import(). Under
// vitest that native import() sits outside the transform pipeline, so a
// seeder's extensionless `'../../app-config'` import fails with
// ERR_UNSUPPORTED_DIR_IMPORT. Declared here, the import() runs inside a module
// vitest transforms; in production it resolves the compiled dist files as before.
// Same reason tests/unit/db/restore-migrates-forward.test.ts sets it.
dynamicImportProvider: (id: string) => import(id),
});