-
Notifications
You must be signed in to change notification settings - Fork 0
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
chore: add http2 alpn test using fastify #34
Conversation
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## http2 #34 +/- ##
==========================================
+ Coverage 85.05% 85.74% +0.68%
==========================================
Files 75 76 +1
Lines 6719 6720 +1
==========================================
+ Hits 5715 5762 +47
+ Misses 1004 958 -46 ☔ View full report in Codecov by Sentry. |
@KhafraDev, is better to have a custom implementation instead of adding other dev dependencies for testing out the ALPN negotiation? If so, I haven't tried yet but we should work on a small fixture that supports ALPN negotiation for testing. |
test/http2-alpn.js
Outdated
|
||
const { Client } = require('..') | ||
|
||
test('Should support secure HTTPS connection', async (t) => { |
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.
This scenario is not really needed, we are just looking to test the ALPN negotiation
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.
Yep, saw your comment in the other PR and will work towards using native http/2.
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.
Looks like I can use the http2 compatibility layer for this. Will try and modify accordingly.
test/http2-alpn.js
Outdated
|
||
const response = await client.request({ | ||
path: '/', | ||
method: 'GET' |
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.
It's better if we try a using a request that can include a body (PATCH/POST
) so we can really test everything is transmitted as expected on both ways
I'm sorry, I completely misunderstood what was being asked. Adding dev dependencies is fine. |
Haha, well I think I have already pretty much got it working without fastify anyways. Will update shortly. |
0ac4ff9
to
2dd73e5
Compare
@KhafraDev I removed fastify as a dev dependency and I still somewhat agree that external dependencies shouldn't be added unless absolutely necessary. Even if the external dependency is a dev dependency. I ended up getting ALPN to work with barebones @metacoder I added a test for handling request bodies as well using a @metcoder95 This is ready to merge when you are. |
@metcoder95 I believe this is ready to be merged. |
* chore: add http2 alpn test using fastify * chore: update to test https 1 with http2 * chore: update alpn test to return server request alpn protocol and http version * chore: add alpn with body * fix: remove fastify from package json
* chore: add http2 alpn test using fastify * chore: update to test https 1 with http2 * chore: update alpn test to return server request alpn protocol and http version * chore: add alpn with body * fix: remove fastify from package json
* chore: add http2 alpn test using fastify * chore: update to test https 1 with http2 * chore: update alpn test to return server request alpn protocol and http version * chore: add alpn with body * fix: remove fastify from package json
No description provided.