CreateMock usage in e2e test #354
Unanswered
christianvanr
asked this question in
Q&A
Replies: 1 comment
-
Unfortunately, I could not delete the previous post, but I found the problem/solution. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm using the @nestjs/testing quite a lot, the createMock() is really helpful in all kind of scenarios.
The only thing I could not understand is when I'm using this in an e2e tests (or graphQl module/resolver test), the test will time out, in all other tests it works as expected.
Any ideas/suggestions, why this is not working (maybe related to the @Inject decorator?):
to reproduce it, you can scaffold a new application (nest new xx) , and modify the app.e2e-spec.ts (adding the mock and overrideProvider) , like this:
Beta Was this translation helpful? Give feedback.
All reactions