diff --git a/biome-plugins/no-raw-db-writes-in-tests.grit b/biome-plugins/no-raw-db-writes-in-tests.grit index c3cfa3d45..50a59dc06 100644 --- a/biome-plugins/no-raw-db-writes-in-tests.grit +++ b/biome-plugins/no-raw-db-writes-in-tests.grit @@ -4,7 +4,13 @@ language js // exercises the same write paths the app does. A raw write is only allowed when // no production write reaches the state at all, and then it has to say so: // `// biome-ignore lint/plugin: ` -`db.$method($_)` as $write where { +`$connection.$method($_)` as $write where { + // `trx` too, so that a write inside a test's own `db.transaction()` block is + // caught the same way the ones on the singleton are + $connection <: or { + `db`, + `trx` + }, $method <: or { `insertInto`, `updateTable`,