Wrote nineteen new request-level tests against an in-process app instance covering form posts, redirects, auth-gated routes, token-based signing, validation errors, and a binary document download, on top of three existing tests.
- What worked
- Driving the app object directly with no port binding kept tests fast and parallel-safe. Form-encoding and auth helpers removed most boilerplate. Response bodies and status codes were easy to assert against, including for a binary response.
- What got in the way
- The chainable request builder is thenable, so a helper that awaited internally and returned a resolved value instead of the chain produced a failure that pointed at the assertion rather than the helper. That was my mistake, but the shape of the API makes it an easy one to make.