-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
add {Bun,Node}HttpServer.layerTest
for testing http servers
#3409
Conversation
🦋 Changeset detectedLatest commit: 9917b61 The changes in this PR will be included in the next version bump. This PR includes changesets to release 24 packages
Not sure what this means? Click here to learn what changesets are. Click here if you"re a maintainer who wants to add another changeset to this PR |
@tim-smart could you please take a look and give me some feedback? I"d like to know what you think about this in general so I can decide whether to move forward with it. |
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.
I think the test live layers are a good addition - I think we can just add them to the HttpServer modules as layerTest
.
Not sure about the in-memory addition. Maybe add those changes in a separate PR and we can discuss there.
@@ -0,0 +1,24 @@ | |||
/** | |||
* @since 0.41.3 |
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.
If you keep all the since tags at 1.0.0, as we are not yet api stable.
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.
I"ll change it. I noticed Giulio uses precise @since
versions in the /schema and I think it"s beneficial for the consumers of the lib.
Thanks for the feedback. I removed the in-memory impl from this PR and adjusted. |
{Bun,Node}HttpServer.layerTest
for testing http servers
POC of http testing modules, it is introducing three new modules
NodeHttpTest
andBunHttpTest
- exposing layers enabling live testing of http apps, I have similar implementation in theeffect-http
package, and one implementation was already used in the test suite for /platform-node so this is only about exposing this functionality for convenient testing in the user-landHttpTest
exposing layers for "in-memory" testing of http apps, it mimics the client <> server comm using a queue, there"s an implementation of request / response classes enabling conversionsclient request -> server request
andserver response -> client response
and finally layers with the implementation ofHttpClient
andHttpServer
that exchange requests / responses through the queue and map the requests / responses.UPDATE: the in-memory implementation was removed and this PR now introduces only the live testing layers.