-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
feat(testing): allow omitting httpAdapter
arg on createNestApplication
#9648
feat(testing): allow omitting httpAdapter
arg on createNestApplication
#9648
Conversation
8b00f1b
to
a4e99bc
Compare
Pull Request Test Coverage Report for Build e991088d-6a88-4808-a8e2-6d3ba41d11d0
💛 - Coveralls |
c92712b
to
d377fd7
Compare
7bc5c47
to
42d655a
Compare
I notice that the following was not using the fastify adapter nest/integration/cors/e2e/fastify.spec.ts Line 33 in 7b112dd
After using it, the integration tests starts failing with |
42d655a
to
d377fd7
Compare
@micalevisk it has been fixed in this PR #9653, so the error as you said does not refer to your PR you made |
this PR is done but I'll mark it as a draft until those changes made on |
httpAdapter
arg on createNestApplication
httpAdapter
arg on createNestApplication
d377fd7
to
721ea53
Compare
I just merged the latest changes from |
the file nest/integration/cors/e2e/fastify.spec.ts Line 33 in 36eda24
|
@micalevisk would you like to look into how we can fix it? if you can't find a solution, can always add |
721ea53
to
dec6748
Compare
Using the latest commit on btw I didn't manage to make the integration tests run locally. |
@micalevisk updating |
Tests are failing now @micalevisk |
9ed46ad
to
95b06a4
Compare
95b06a4
to
5e8c619
Compare
@micalevisk i had also received a similar error during some PRs (for example, see #9768), but had no idea how to fix it. I'm still not sure at the moment, still exploring a little, but I think this problem you had opened is the starting point to solve it #9629. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
When using
createNestApplication
fromTest.createTestingModule()
, the only way to pass options while still using the default http adapter is by passingundefined
(or any falsy value) as the first arg like this:but to me this interface doesn't feels good from DX POV. See nestjs/docs.nestjs.com#2119 (which can be closed if we merge this PR)
What is the new behavior?
the options must be supplied in the first arg if we want to use the default http adatper, like so:
which I believe is more intuitve than passing
undefined
. The old version isn't allowed anymoreDoes this PR introduce a breaking change?