Skip to content
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

Example of unit tests #59

Open
qindj opened this issue Aug 15, 2023 · 1 comment
Open

Example of unit tests #59

qindj opened this issue Aug 15, 2023 · 1 comment

Comments

@qindj
Copy link

qindj commented Aug 15, 2023

Hi,

first thank you for your template, it's very useful.

I have a small question, could you please give me an example of how to write unit tests correctly?

if i put post_tests.go along with post.go under controller package, and use app.New() to init app in post_tests, it shows me "import recycle" error.

what can i do?

@GalvinGao
Copy link
Owner

Hi there!

Thanks for the kindly words! I can add some example test cases to the project so you can reference accordingly :D

In the meantime you can see what I've done at another project: https://github.com/penguin-statistics/backend-next/tree/main/test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants