You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
git clone https://gitlab.com/micalevisk/nestjs-testing-http-adapter-host-issue
cd nestjs-testing-http-adapter-host-issue
npm ci
npm run test:e2e
# see the error
npm start
# works fine
Expected behavior
the value of httpAdapterHost.httpAdapter of the injected HttpAdapterHost should be an instance of ExpressAdapter, not undefined. Like it is when using NestFactory.create()
Package
I don't know. Or some 3rd-party package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other (see below)
Other package
No response
NestJS version
10.1.3
Packages versions
[System Information]
OS Version : Linux 6.2
NodeJS Version : v18.15.0
NPM Version : 9.6.6
[Nest CLI]
Nest CLI Version : 10.1.11
[Nest Platform Information]
platform-express version : 10.1.3
schematics version : 10.0.2
testing version : 10.1.3
common version : 10.1.3
core version : 10.1.3
cli version : 10.1.11
Node.js version
No response
In which operating systems have you tested?
macOS
Windows
Linux
Other
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Current behavior
when injecting
HttpAdapterHost
,httpAdapter
getter is returningundefined
even tho the host does hasExpressAdapter
instantiated on ithere's the print of
httpAdapterHost
value:here's the print of
httpAdapterHost.httpAdapter
:Testing module setup:
Minimum reproduction code
https://gitlab.com/micalevisk/nestjs-testing-http-adapter-host-issue
Steps to reproduce
Expected behavior
the value of
httpAdapterHost.httpAdapter
of the injectedHttpAdapterHost
should be an instance ofExpressAdapter
, notundefined
. Like it is when usingNestFactory.create()
Package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other package
No response
NestJS version
10.1.3
Packages versions
Node.js version
No response
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: