SnapOtter
5b3b3c7632
fix(test): mock db/index.js in unit tests that import API modules
...
Five unit tests crashed because they imported modules that transitively
reached db/index.ts, which eagerly calls `new Database()` at module load
time. Added vi.mock for db/index.js matching the pattern used by 16
other passing API unit tests.
Moved cleanup.test.ts to tests/integration/ since it uses a real SQLite
database, runs migrations, and inserts rows.
2026-06-09 23:34:36 +08:00
..
2026-05-12 23:19:20 +08:00
2026-05-09 18:02:58 +08:00
2026-05-12 23:19:20 +08:00
2026-06-06 19:37:29 +08:00
2026-05-12 23:19:20 +08:00
2026-05-15 21:35:02 +08:00
2026-04-24 23:50:47 +08:00
2026-05-13 15:47:28 +08:00
2026-04-29 23:47:19 +08:00
2026-06-06 19:37:29 +08:00
2026-04-22 18:10:04 +08:00
2026-05-07 19:41:30 +08:00
2026-05-14 17:42:07 +08:00
2026-04-22 18:10:04 +08:00
2026-04-22 18:10:04 +08:00
2026-04-22 18:10:04 +08:00
2026-06-06 19:37:29 +08:00
2026-05-13 10:05:42 +08:00
2026-06-06 19:37:29 +08:00
2026-05-01 19:51:47 +08:00
2026-06-06 19:37:29 +08:00
2026-06-06 19:37:29 +08:00
2026-06-09 23:34:36 +08:00
2026-06-06 19:37:29 +08:00
2026-06-06 19:37:29 +08:00
2026-06-06 19:37:29 +08:00
2026-06-06 19:37:29 +08:00
2026-05-01 19:51:47 +08:00
2026-06-06 19:37:29 +08:00
2026-06-06 19:37:29 +08:00
2026-05-11 17:33:51 +08:00
2026-04-26 12:03:08 +08:00
2026-05-01 19:51:47 +08:00
2026-05-11 21:57:40 +08:00
2026-05-01 19:51:47 +08:00
2026-04-22 18:10:04 +08:00
2026-04-22 18:10:04 +08:00
2026-04-24 18:06:29 +08:00
2026-05-14 16:59:40 +08:00
2026-05-01 19:51:47 +08:00
2026-05-01 19:51:47 +08:00
2026-05-13 13:45:08 +08:00
2026-04-22 18:10:04 +08:00
2026-06-06 19:37:29 +08:00
2026-05-12 03:58:42 +08:00
2026-06-06 19:37:29 +08:00
2026-05-15 21:35:02 +08:00
2026-06-08 15:49:47 +08:00
2026-06-06 19:37:29 +08:00
2026-05-18 18:16:07 +08:00
2026-05-18 17:48:21 +08:00
2026-06-06 19:37:29 +08:00
2026-06-06 21:45:39 +08:00
2026-05-09 19:52:11 +08:00
2026-06-06 19:37:29 +08:00
2026-06-06 19:37:29 +08:00
2026-05-09 18:02:58 +08:00
2026-06-06 19:37:29 +08:00
2026-05-18 17:48:21 +08:00
2026-05-01 19:51:47 +08:00
2026-05-01 19:51:47 +08:00
2026-06-06 19:37:29 +08:00
2026-05-09 18:02:58 +08:00
2026-04-22 18:10:04 +08:00
2026-05-01 19:51:47 +08:00
2026-04-26 12:03:08 +08:00
2026-04-22 18:10:04 +08:00
2026-05-13 10:05:42 +08:00
2026-05-09 09:02:29 +08:00
2026-05-09 18:02:58 +08:00
2026-05-07 19:41:30 +08:00
2026-04-22 18:10:04 +08:00
2026-05-01 19:51:47 +08:00
2026-06-05 23:05:25 +08:00
2026-06-06 19:37:29 +08:00
2026-05-01 19:51:47 +08:00
2026-05-13 16:59:13 +08:00
2026-05-01 19:51:47 +08:00
2026-06-06 20:17:49 +08:00
2026-05-13 21:33:50 +08:00
2026-05-13 21:33:50 +08:00
2026-05-09 09:02:29 +08:00
2026-06-06 19:37:29 +08:00
2026-05-09 09:02:29 +08:00
2026-06-06 19:37:29 +08:00
2026-06-06 19:37:29 +08:00
2026-05-09 09:02:29 +08:00
2026-06-06 19:37:29 +08:00
2026-03-26 01:10:51 +08:00
2026-05-14 10:46:24 +08:00
2026-06-06 19:37:29 +08:00
2026-06-06 19:37:29 +08:00
2026-05-01 19:51:47 +08:00
2026-05-09 09:02:29 +08:00
2026-05-09 18:02:58 +08:00
2026-06-06 19:37:29 +08:00
2026-06-06 19:37:29 +08:00