Reputation: 43559
I have my folder structured like:
backend
|-Process1
|-Process2
|-app
|-config
|-controllers
|-models
public
|-css
|-js
Where should I put my unit tests folder?
Upvotes: 5
Views: 1116
Reputation: 1602
For node projects, it's common to have a tests folder in the top level. For example, for my projects I usually have these folders:
bin
(for bins)lib
(for my node.js library files)test
(for tests)config
(for config files, if necessary)public
or static
(for static assets, if necessary)node_modules
(where npm-installed modules end up going)For the most part it's not too critical how you organize the code as long as it's organized and has obvious entry points. Basically, you should be able to type "npm test" and have it work by reading the command from the package.json.
Upvotes: 7