How to create TDD in Node.js?

I have a folder structured as:

backend
   |-Process1
   |-Process2
   |-app
      |-config
      |-controllers
      |-models
public
   |-css
   |-js

Where should I put my palette of test modules?

+5
source share
1 answer

For node projects, there is usually a folder with tests at the top level. For example, for my projects, I usually have the following folders:

  • bin (for boxes)
  • lib (for node.js files)
  • test (for tests)
  • config (for configuration files, if necessary)
  • publicor static(for static assets, if necessary)
  • node_modules (where modules with installed npm end)

, , . , "npm test" , package.json.

+7

All Articles