Currently I am implementing client side unit testing using karma jasmine for a big project I've been working on.
I'm looking for a best practice to structure our testing code in a Visual Studio solution. The project has over 50 different js files that should all have their own unit test script. Also the directory structure of the code goes up to 8 directories deep. I've thought about a couple of different approaches to structure the unit tests files.
- Unit test files in the same directory as the code files that should be tested
- Unit test files in a subdirectory "tests" in each of the directories with code
- A directory called "tests" in the root of the project with the same directory structure as the actual code
- A new project with a directory with the same directory structure as the actual code
What is a good way to structure my client side unit tests files in a big project and still keep it maintainable and "clean"?
Aucun commentaire:
Enregistrer un commentaire