-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add Apollo Server Integration Testsuite #2
Comments
Current progress: Next.js unit testing is usually done by just rendering React components. API Routes are quite similar, usually you just test the logic in the handler. In this case however I want to make sure we actually unit test using Next.js, not just the React or logic handling parts, so we can be sure that error handling and server responses are correct. Looking at Next.js they seem to do integration testing by running Next.js once in dev mode, and once by actually building the application and serving it: https://github.com/vercel/next.js/blob/canary/test/integration/404-page/test/index.test.js This would work, however the Apollo Server Integration Testsuite has a wide array of tests, where both Apollo Server's config ( To counter this I'm trying out a method where for each test we save Another issue I've encountered is that all the tests assume Apollo Server is accessible at |
If you see good ways to improve the API for the testsuite, please don't hesitate to open a PR! For serverless-y integrations, we generally mock the incoming request so it calls your function/lambda the way it would be called. It's clunky for sure! |
https://github.com/apollographql/apollo-server/tree/main/packages/integration-testsuite
The text was updated successfully, but these errors were encountered: