mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-22 23:22:09 +03:00
Compare commits
4 Commits
fix/11060-
...
fix/releas
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b35f84ea04 | ||
|
|
1eeb657e93 | ||
|
|
c28c866e10 | ||
|
|
495516a8e7 |
3
changelog.d/fixes/release-v3850-basereds.md
Normal file
3
changelog.d/fixes/release-v3850-basereds.md
Normal file
@@ -0,0 +1,3 @@
|
||||
- fix(api): repair broken `@/lib/db/connections` import in the usage utilization route that failed the production build (#10939 follow-up)
|
||||
- chore(docs): regenerate PROVIDER_REFERENCE and refresh README diagram SVGs to the real provider count (347)
|
||||
- chore(lint): prune ESLint suppressions orphaned on the release branch
|
||||
16
tests/unit/utilization-route-import-10939.test.ts
Normal file
16
tests/unit/utilization-route-import-10939.test.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { test } from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import { mkdtempSync } from "node:fs";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
|
||||
// #9985 base-red (introduced by #10939): the utilization route imported
|
||||
// `getConnection` from "@/lib/db/connections", a module that does not exist —
|
||||
// typecheck:core does not cover app routes, so only `next build` (and any
|
||||
// runtime import, like this test) catches it. Importing the route module is
|
||||
// the repro: ERR_MODULE_NOT_FOUND before the fix, resolves after.
|
||||
test("utilization route module resolves all its imports (#10939 broken-import regression)", async () => {
|
||||
process.env.DATA_DIR = mkdtempSync(join(tmpdir(), "omniroute-utilization-import-"));
|
||||
const mod = await import("../../src/app/api/usage/utilization/route.ts");
|
||||
assert.equal(typeof mod.GET, "function", "route must export a GET handler");
|
||||
});
|
||||
Reference in New Issue
Block a user