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

Standardize test location? #38

Closed
benmccann opened this issue Apr 20, 2020 · 1 comment
Closed

Standardize test location? #38

benmccann opened this issue Apr 20, 2020 · 1 comment

Comments

@benmccann
Copy link

benmccann commented Apr 20, 2020

Thanks so much for providing this! It's helpful in learning these technologies

One question I had when looking at the code is that there seem to be different places to put the tests. Sometimes they're in a __tests__ directory and sometimes they aren't. For example:

Is this intended? If so, what goes where?

@clintonwoo
Copy link
Owner

Yeah the __tests__ folder was placed in that location since NextJS uses every file in the pages folder to make a URL route handler. We obviously don't want test files becoming routes on the web server so we have that + all the other unit tests are colocated.

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