#nest js graphql E2E test help
14 messages · Page 1 of 1 (latest)
Any help please ?
Send an actual request? That would be how an e2e test should work, right?
Yes but I get an error saying request is undefined
What's the error? What's the request look like?
This is the E2E test suite
And this calls the create mutation resolver and in the service layer of create the service method takes request as one parameter which is from ExecutionContext
:warning: Please do not screenshot code as it causes a number of issues:
- Ease of assistance: if someone wants to copy your code and correct it, they cannot. Making it easy for people to help you is in your best interests.
- Editorializing: it's common to try to make images small, which means you're likely to crop out code relevant to your issue
- Accessibility: wide images can be hard to read on mobile devices, and are impossible for screen readers.
- Legibility: you cannot read screenshots of code directly, instead you have to open them in an enlarged context.
- Bandwidth usage/clutter: some of our members use metered connections, and it is wasteful for them to download images of a text.
For a small amount of code, please use a code-block.
And in the code we access request headers section and that is being undefined
That’s the core issue
The headers section has user info
I can't read the photo you took. Please actually paste code in a code block
Hello @untold talon , recently i have been assigned to write a test cases of a one project , which is written in nest + graphql and they used prisma orm in it.
i have did testing before it but in express, i don't have much idea about how to write test cases for a graphql app.
so can you share me some resources from where do you learn also can you share me any of your repo for refrence, it would be a great help.
Thanks.