lundi 27 février 2017

Node.js folder structure: unit tests and e2e tests

Currently, I have the following structure:

/src
/tests/e2e
/specs

Whereas the specs folder I use for unit tests, and the structure inside the specs is the same structure as inside src. (e.g. for /src/user/validator.js there is a /specs/user/validator.spec.js file).

However, it doesn't feel right to me to have two testing folders in the root dir, and I'm wondering if there is any convention in the community about this.

I did go through this thread: Folder structure for a Node.js project. The suggestion there is spec for BDD and tests for unit tests. However, I use BDD (with Jasmine or Mocha) for both: unit tests and e2e tests.

Aucun commentaire:

Enregistrer un commentaire