-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
[Doc request] Add unit/e2e tests to repo's samples #1539
Comments
@kamilmysliwiec Any updates on this? New user here -would love to use right techniques |
Please submit only one Pull Request per sample. These contributions do have a great impact on NestJS. Not only will you provide better documentation for developers (the sample folder is a widely used resource to look up real-world examples) but also improve NestJSs integration tests. If you need help with your Pull Request, you can find good resources on the Hacktoberfest website. Additionally, you can always ask for support at our Discord channel. Happy hacking! :) |
A sample e2e test.
|
are we maintaining a list somewhere of the samples that have E2E/units written, or contributors are expected to search through the samples 😅. Maintaining a list will most probably avoid multiple people working on the same items. |
I think current E2E sample in documentations (cat) is oversimplified and misses many points. For instance it basically mocks cats service and avoids database connection altogether which makes me think what'd be the point of that? How's that any different from unit testing? Another flaw is app setup, the sample in docs completely skips over features that main function might have been implemented, things like Guards, Interceptors and... Which has a huge effect on E2E test results. |
@omidh28 PRs are more than welcome! |
For those looking for more as well, I have a growing repository of examples for testing. |
I just did one PR for Any feedback is welcome. |
@kamilmysliwiec any update on my pr, I have a bit of time this week I would love to help add more unit/e2e tests |
@kamilmysliwiec any update on this, i was looking to do more contribution :) |
Is this issue still needed, or my pr is not good? |
Hi! Do you still need help with this? |
Is this issue still open ? |
Hello I can help with this issue if no one working on it? @kamilmysliwiec @BrunnerLivio |
I'm submitting a...
Current behavior
Samples in nest/samples are missing examples of unit and/or e2e tests. Particularly of interest to me is 05-sql-typeorm, but other samples seem to be the same. Sample 01-cats-app contains some tests, but they are quite basic.
ExpectedDesired behaviorSamples for specific features/techniques include unit and/or e2e tests pertaining to those features/techniques. For example, the sample given above (05) could include tests that show how to test endpoints, mock data, or connect to a testing database.
Minimal reproduction of the problem with instructions
Sample 05-sql-typeorm. Notably, the tests/ dir and /src/**/*.spec.ts files are not present. Also, they are excluded by the samples' local gitignore.
What is the motivation / use case for changing the behavior?
Environment
Nest version: master branch
For Tooling issues: N/A
Others: N/A
The text was updated successfully, but these errors were encountered: