Conversation
testflyjets
left a comment
There was a problem hiding this comment.
Just one question -- what's the best practice for where the tests should live? I think having them directly alongside the executable code makes it harder to find the module you need, so would a /test directory make sense?
maxtopc
left a comment
There was a problem hiding this comment.
This is great!! Thank you, Kiril! I personally also prefer having the tests in a folder (as Chris had mentioned). It is a matter of preference of exact location/naming, of course, but I prefer having them in a _tests folder (the underscore, underscoring that it is not part of the code!). Also a matter of preference, but if there is a big set of features where it has its own folder (in the case of helper.js being in the common folder), I personally would put the _tests folder (or just tests folder if you aren't a fan of the _tests with the underscore) in that same folder (vs. putting them all in the src folder). I also am a fan of having a features folder if we are adding reusable, stand-alone features in the future and having them be as independent as possible, where if they have to make calls to other parts of the project, they via facade pattern in just one contact point vs. direct imports/calling all over the code) and then having those have their own test folders as well -- so basically, in a folder as close to the code as possible would be my vote! Thanks again for taking this on!
|
@testflyjets @maxtopc both wyas are popular:
I moved them to neatly organized /tests directory which mimic the src folder structure so we know where to search for the tests. |
Uh oh!
There was an error while loading. Please reload this page.