geshan/expressjs-structure

Argument about tests location

DominicF96 opened this issue ยท 0 comments

Hello !

I hope this kind of issue is welcome. ๐Ÿ˜…

I've inspected the project structure you suggest and found that it works really well for me.
I used to regroup what goes in controllers and services and always ended up with hardly reusable code.
With your approach, I can now reuse code much more easily so thanks for that! ๐Ÿฅณ

One thing I would argue about though is the location of the tests.

While it's nice to isolate tests so that they don't 'polute' your source code, having them in
a different directory feels weird for various reasons;

  • It puts them aside and not part of the project, therefore developers would be less inclined to write them
  • It goes against the module mentality (which makes it less reusable)
  • It makes them harder to find when working on specific files

Would love to hear your opinion on that, thanks again for this structure template ! ๐Ÿ˜„