Closed psteinroe closed 3 years ago
I just realised that my problem comes from using createTestClient, where the middlewares are not applied..
Thank you for trying to use this package. I'm happy to hear that it works well. Please ping me if you have any issue.
Hi,
I am trying your package but it seems like the middleware is not applied in e2e tests. While running the app normally it works fine though. Any ideas where the problem may be?
Edit: The "onModuleInit" is executed in the e2e tests, although the middleware itself is not..
Edit: The Code I setup the testing module in the normal way:
I import the module in my main app module:
In the AuthGuard I set the value:
and in the resolver-layer, I read it:
const ctx: ExecutionContextStorage = RequestContext.get();