Closed dcramer closed 3 months ago
Two core issues:
opened https://github.com/chaijs/check-error/issues/51 as part of this, but ultimately whats happening (afaik) is something changed, possibly with vitest, where the expect'd promise rejection tests are now trigger an uncaught promise rejection, and the error was being masked
Attention: Patch coverage is 81.05263%
with 126 lines
in your changes are missing coverage. Please review.
Project coverage is 78.29%. Comparing base (
0caeb6f
) to head (7b02f75
).
:white_check_mark: All tests successful. No failed tests found :relaxed:
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I've rewritten the promise rejection tests to use trpc's waitError pattern (which should avoid the dangling promise concern, hopefully). Unfortunately the goal of also using inline snapshots has led to yet a new random error
For future me:
All of the issues were caused by vitest and vitest-mock-axios.
The vitest-mock-axios package was installing a different version of vitest, which somehow conflicts with itself (I'm guessing it patches/does codegen), which was causing the rejected promises error as well as the snapshot error.
Replacing that with mock-axios-adapter and everything works as expected.
More context here https://github.com/chaijs/check-error/issues/51
🙏
@peated/worker
into@peated/server
defaults
andfixtures
to default fixture injection for vitest