We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 692d5f8 commit a231a42Copy full SHA for a231a42
tests/db-indexes.test.ts
@@ -0,0 +1,16 @@
1
+import { describe, expect, test } from "bun:test";
2
+
3
+process.env.DATABASE_URL = ":memory:";
4
+const { db } = await import("../src/services/db");
5
6
+describe("DB indexes", () => {
7
+ test("has index on drops.id", () => {
8
+ const indexes = db.prepare("PRAGMA index_list(drops)").all();
9
+ expect((indexes as any[]).length).toBeGreaterThan(0);
10
+ });
11
12
+ test("journal mode is set", () => {
13
+ const result = db.prepare("PRAGMA journal_mode").get() as { journal_mode: string };
14
+ expect(["wal","memory"]).toContain(result.journal_mode);
15
16
+});
0 commit comments