jevstrudel.git / worker / test / CLAUDE.md
1@README.md
2
3## Notes for agents
4
5**Test storage code against `testD1()`, not a hand-written fake.** A fake store only checks that the Worker called it; `testD1()` runs the SQL, so a typo, a missing index column or a violated `CHECK` fails the test. Each call is a fresh database.
6
7**It implements what the Worker uses, not all of D1.** `prepare().bind()` with `run()`, `all()`, `first()`, `raw()`, plus `batch()` (one transaction) and `exec()`. When your code needs another method, add it here rather than faking around it.