After William's comment Pascal routed this ticket to discussion in the mailing list.
Maybe two parts from this issue need discussion (according to William comment) and/or voting.
I try to make summary which is suitable for voting. For details can read discussion in
1. Move models away from shared folder in Angular client
a. leave models in shared/model/
* models can be used elsewhere in application, so better don't move under entity folderc. generate entity models into app/entities/<entity-name>/<entity-name>.model.ts and enums to model/
reasoning:
https://angular.io/guide/styleguide#locate - code location should be intuitive, simple and fast - currently if I work with entity and want to look into it's model file then I must do extra effort to find it because it's not under entity folder
2. Move unit tests next to files they are testing
a. leave tests in src/test/javascript/spec
reasoning:
* as in Vue and React side tests are there then tests should be there also in Angular client
* developers with Java backend are used to the fact that tests are separated, so for them it's familiar to see tests separated also in Angular client
b. Move unit tests next to files they are testing and delete src/test/javascript/spec after that
reasoning:
* follow Angular best practice as described in:
https://angular.io/guide/testing#place-your-spec-file-next-to-the-file-it-tests - I agree with all those arguments
* as Angular CLI generates tests next to files they are testing then currently we have turned off tests generation in Angular CLI; I think this is very bad to our reputation, this leaves impression like we think that unit testing is unimportant, which is wrong of course.
* Angular examples in the web are following this Angular best practice, after this change application generated by us is with similar structure as those examples
In the morning I already started working with this 2. point and I finished this work in branch
https://github.com/kaidohallik/generator-jhipster/tree/refactor-angular-testsSo if someone wants to see how it looks if unit tests are next to files they are testing then this branch generates such Angular client.
With best regards,
Kaido.