Commit 193d084
committed
test(bigquery): compare URL and body to each other, not to two literals
cubic found expect(serialized).not.toContain(' my-project ') could not fail:
it was written when the fixture supplied a padded projectId, and once the strict
guard made padding throw I unpadded the fixture and left the assertion behind.
Changing a fixture silently defanged an assertion written for the old one.
Padded refusal is covered where it belongs — NEWLY_TRIMMED_BY_THIS_CHANGE and
the destructive-tool describe — so nothing is lost by dropping it.
The expected body value is now derived from the URL rather than hard-coded, so
the test is about agreement: if either side starts naming a different project it
fails, whereas two independent literals both pass a change made to both.
Verified by pointing the body at 'other-project' — fails now, would have passed
before.1 parent 345ef7f commit 193d084
1 file changed
Lines changed: 19 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
190 | | - | |
191 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
192 | 208 | | |
193 | 209 | | |
194 | 210 | | |
| |||
0 commit comments