mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-02 09:22:15 +00:00
test(server): seed the small leftover specs through the repositories
Converts the raw prepare() reads and writes in the share, airtrail, files, todo, dev-link, vacay, tours, bucket list, unit-of-work and plugin guard specs to the ORM factories and readers, so they go through the entities the app uses instead of hand-written SQLite. The vacay e2e moves from hand-rolled tables to the migrated snapshot, with its user pinned to the id its session cookie is signed for. Statements that are raw by nature keep the allow marker with the reason: the legacy oracle of the bucket list parity spec, the PRAGMA probe of the trek_photos migration, the unmapped probe table of the route import rollback, the behind-the-ORM reads of the entity insert probes, and seedUser, which also serves the hand-rolled users table of createTempDb. Comments that quoted a prepare() call are reworded so the ratchet no longer counts them.
This commit is contained in:
@@ -32,7 +32,7 @@ function controller(invoke: () => unknown, providers = ['ev-plug']) {
|
||||
} as unknown as PluginHooks;
|
||||
// Plan 3j Task 3: `declaredProfiles` now takes `PluginsRepository`, not the raw
|
||||
// connection — `findCapabilities` reads the same `capabilitiesRow` fixture the
|
||||
// old `connection.prepare(...).get()` stub above read.
|
||||
// old raw `connection.prepare` stub above read.
|
||||
const plugins = {
|
||||
findCapabilities: vi.fn(async () => (capabilitiesRow.value === undefined ? null : capabilitiesRow.value)),
|
||||
} as unknown as PluginsRepository;
|
||||
|
||||
Reference in New Issue
Block a user