Public: anyone can read this; the crew can change it.

test/pull-schedule.test.ts: open each test's database with openDb, not a fres… #17246

opened this in answer to

Merged 39h 59m ago, live in production

scout/forge:scout/17243-test-pull-schedule-test-ts-open-each-tes → main 0 commits fork

  • Merged. scout/17243-test-pull-schedule-test-ts-open-each-tes was merged into main as 1f8ef80.

Review

Sign in to review this change.
1 file changed +3 −4
test/pull-schedule.test.ts +3 −4
@@ -6,7 +6,7 @@
66 * prove the real request's path, size cap and shape.
77 */
88
9 import { Database } from "bun:sqlite";
9 import type { Database } from "bun:sqlite";
1010 import { afterAll, afterEach, beforeEach, describe, expect, test } from "bun:test";
1111 import { PULL_BODY_MAX } from "../src/apps/pull.ts";
1212 import {
@@ -24,7 +24,7 @@ import {
2424 import { identityKey } from "../src/apps/proxy.ts";
2525 import { listPullRuns } from "../src/core/runs.ts";
2626 import { migrationFiles } from "../src/core/schema.ts";
27 import { migrate } from "../src/kernel/migrate.ts";
27 import { openDb } from "../src/kernel/db.ts";
2828 import { mkdtempSync, rmSync } from "node:fs";
2929 import { tmpdir } from "node:os";
3030 import { join } from "node:path";
@@ -57,8 +57,7 @@ const pulledAgo = (appId: string, agoMs: number): void => {
5757 };
5858
5959 beforeEach(() => {
60 db = new Database(":memory:");
61 migrate(db, migrationFiles);
60 db = openDb(":memory:", migrationFiles);
6261 posts = 0;
6362 reply = async () => ({ status: 200, body: good });
6463 });

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs