-
-
Notifications
You must be signed in to change notification settings - Fork 0
chore(supertest): add property-based tests for HTTP response assertions #339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds comprehensive property-based tests for all 14 HTTP response assertions in @bupkis/supertest, following the established pattern from @bupkis/sinon. The implementation uses fast-check to generate randomized test inputs and validate assertion behavior across the input space.
Changes:
- Added
property.test.tswith 56 property-based tests covering status code, header, body, and redirect assertions - Exported individual assertion functions from
assertions.tsfor test access (previously only exported the array) - Removed unnecessary express/supertest dependencies that were mistakenly added in a previous commit
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/supertest/test/property.test.ts | New comprehensive property-based test suite with helper arbitraries for HTTP response generation and test configurations for all 14 assertions |
| packages/supertest/src/assertions.ts | Exported individual assertion functions to enable test access while maintaining backward compatibility |
| packages/supertest/package.json | Added fast-check as devDependency, removed unnecessary express/supertest dependencies |
| package-lock.json | Cleaned up dependency tree by removing express, supertest, and their transitive dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6b54412 to
fb32dc4
Compare
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This adds comprehensive property tests for all 14 @bupkis/supertest assertions using @bupkis/property-testing and fast-check. The tests generate random HTTP responses and validate assertion behavior across the input space. Changes: - Export individual assertions for testing access - Add property test configs for status code assertions (2) - Add property test configs for header assertions (3) - Add property test configs for body assertions (6) - Add property test configs for redirect assertions (3) - Create helper arbitraries for HTTP response generation Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
fb32dc4 to
a4a3953
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Summary
@bupkis/supertestassertionsassertions.tsfor test access (matching@bupkis/sinonpattern)Test Coverage
Test Plan
@bupkis/sinonproperty tests🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com