Commit 2d33279
committed
fix(tests): add /users/me/regions/ mock to resolveOrgAndIssueId tests
The tests mocked globalThis.fetch for /organizations/ and /projects/
endpoints but not /users/me/regions/. When getUserRegions() got a 404
from the mock, ky threw an HTTPError which listOrganizations caught
and fell back to the non-region path. On certain CI runner images, this
error-fallback code path fails. Adding an explicit regions mock avoids
the error path entirely and makes the tests deterministic.1 parent 3a4cfaf commit 2d33279
1 file changed
+24
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
314 | 322 | | |
315 | 323 | | |
316 | 324 | | |
| |||
390 | 398 | | |
391 | 399 | | |
392 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
393 | 409 | | |
394 | 410 | | |
395 | 411 | | |
| |||
450 | 466 | | |
451 | 467 | | |
452 | 468 | | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
453 | 477 | | |
454 | 478 | | |
455 | 479 | | |
| |||
0 commit comments