mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-20 19:16:08 +00:00
test(db): run the places and incoming leg mode suites on the real database module
They reset through resetDatabase and seed through the ORM factories instead of the SQLite snapshot mock, so they run in the Postgres lane as well. The two cases about a NUL byte in a place name move to places-nul-sqlite.test.ts, listed in SQLITE_ONLY: they pin SQLite's value quoting, and Postgres text cannot hold U+0000. The control characters 0x01 to 0x1F stay in places.test.ts and run on both engines.
This commit is contained in:
@@ -57,6 +57,10 @@ export const SQLITE_ONLY: Readonly<Record<string, string>> = {
|
||||
'tests/integration/demo-reset-connection-swap.spike.test.ts':
|
||||
'Closes and reopens the better-sqlite3 handle in src/db/database.ts mid request context; the Postgres ' +
|
||||
'engine has no such handle.',
|
||||
'tests/integration/places-nul-sqlite.test.ts':
|
||||
'About SQLite value quoting of a NUL byte (U+0000) in a user string; Postgres text cannot hold that ' +
|
||||
'character, so the round-trip it asserts does not exist there. The other control characters run on ' +
|
||||
'both engines in places.test.ts.',
|
||||
};
|
||||
|
||||
const SNAPSHOT_BASELINE_FILE = path.join(__dirname, 'snapshot-suites-baseline.json');
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
[
|
||||
"tests/integration/leg-mode-incoming.test.ts",
|
||||
"tests/integration/legacy-upgrade-v066.test.ts",
|
||||
"tests/integration/legacy-upgrade-v082.test.ts",
|
||||
"tests/integration/legacy-upgrade-v205.test.ts",
|
||||
@@ -11,7 +10,6 @@
|
||||
"tests/integration/memories-unified.test.ts",
|
||||
"tests/integration/oauth-authorize.test.ts",
|
||||
"tests/integration/oauth.test.ts",
|
||||
"tests/integration/places.test.ts",
|
||||
"tests/integration/scheduler-gate.test.ts",
|
||||
"tests/integration/security.test.ts",
|
||||
"tests/integration/settings.test.ts",
|
||||
|
||||
Reference in New Issue
Block a user