Repository navigation
Commit 97916f4
committed
test(poe): observe the request start instead of sleeping in the capture case
The compile lane's lint step reported one error on the previous head:
src/api/providers/__tests__/poe.spec.ts 874:42 error Unexpected use of setTimeout
(poll with vi.waitFor on the observable condition), from the spec's own 200ms delay inside
the mocked call. The case now observes the request having started - vi.waitFor on
mockGenerateText being called once with interval 1, so the poll cannot outlast the deadline
it is about to mutate away - and the mocked call hangs on its own abort listener instead
of a timer, with the deadline widened to 250ms so the mutation lands first.
Control re-proved after the rewrite: 1 failed of 45 with the capture removed (the guard
reading options.timeoutMs again) and 45 passed with configuredTimeoutUsable in place.
Ordering fixed for this commit: prettier first, then eslint --max-warnings=0 over the
touched files (exit 0), then the spec re-run (45/45), then tsc --noEmit (exit 0). The
previous head was pushed with a lint run that predated prettier's normalisation, which is
why the local run read clean while CI disagreed. src/eslint-suppressions.json untouched;
no changeset, no CHANGELOG, hooks not skipped.1 parent 0e51532 commit 97916f4
1 file changed
Lines changed: 15 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
866 | 866 | | |
867 | 867 | | |
868 | 868 | | |
869 | | - | |
870 | | - | |
871 | | - | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
872 | 873 | | |
873 | | - | |
874 | | - | |
875 | | - | |
876 | | - | |
877 | | - | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
878 | 882 | | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
879 | 886 | | |
880 | 887 | | |
881 | 888 | | |
| |||
0 commit comments