Skip to content

Commit 6e02920

Browse files
committed
feat(tests): mock database in chaos tests for pure function evaluation
1 parent c8fee3a commit 6e02920

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

tests/chaos.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
import { describe, it, expect } from 'vitest'
1+
import { describe, it, expect, vi } from 'vitest'
2+
3+
// chaos.ts importa ../src/db (crea el cliente Turso al cargar). Estos tests
4+
// solo ejercen funciones puras, así que sustituimos db por un stub inerte.
5+
vi.mock('../src/db', () => ({ db: {} }))
6+
27
import {
38
routeMatches,
49
pickChaos,

0 commit comments

Comments
 (0)