mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-24 16:12:23 +03:00
Validated on a 3-PR combined board: 11018-database-cache-docs 1/1 within the board's 20/20 focused suite, typecheck:core clean, gates within baseline. DATABASE_GUIDE.md now cites the real 64 MiB runtime default and the 1..1,000,000 KiB range, locked with a regression test. Thank you @RaviTharuma!
16 lines
750 B
TypeScript
16 lines
750 B
TypeScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
import { readFileSync } from "node:fs";
|
|
import { DEFAULT_DATABASE_SETTINGS } from "../../src/types/databaseSettings.ts";
|
|
|
|
const guide = readFileSync(new URL("../../docs/ops/DATABASE_GUIDE.md", import.meta.url), "utf8");
|
|
|
|
test("database guide keeps cache tuning aligned with runtime settings (#11018)", () => {
|
|
const defaultCacheSize = DEFAULT_DATABASE_SETTINGS.optimization.cacheSize;
|
|
|
|
assert.match(guide, new RegExp(`${defaultCacheSize.toLocaleString("en-US")} KiB`));
|
|
assert.match(guide, /1 to\s+1,000,000 KiB/);
|
|
assert.match(guide, /saving the setting applies it to the live database connection/);
|
|
assert.match(guide, /restores the persisted value at startup/);
|
|
});
|