fix(production): preserve emitted plugin runtimes

This commit is contained in:
2026-08-13 18:00:30 +05:30
parent 94a6b436f5
commit 5106256401
6 changed files with 110 additions and 4 deletions
+7
View File
@@ -213,6 +213,13 @@ test("query generator infers params and result types", () => {
);
});
test("query generator omits ExecResult when there are no exec queries", () => {
const queries = parseQueries("-- name: ListUsers :many\nSELECT * FROM users;");
const code = generateQueriesFile(queries, [{ varName: "users", model: users }], "sqlite");
expect(code).toContain('import type { Db } from "@wrnexus/db";');
expect(code).not.toContain("ExecResult");
});
test("paginate returns a page window with correct metadata", async () => {
const { paginate } = await import("../src/index.ts");
const db = createDb(sqlite());