fdelbrayelle/generator-jhipster-kafka

Improve generator tests

fdelbrayelle opened this issue · 0 comments

Overview of the feature request

nyc has been installed to check the code coverage. It could be improve and above all some functional parts are not well tested.

Running npm test now display the code coverage:

----------------|---------|----------|---------|---------|----------------------------------------------------------------
File            | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                                              
----------------|---------|----------|---------|---------|----------------------------------------------------------------
All files       |   90.82 |    72.22 |   89.41 |   91.85 |                                                                
 generators     |     100 |      100 |     100 |     100 |                                                                
  constants.js  |     100 |      100 |     100 |     100 |                                                                
 generators/app |   90.45 |    72.22 |   89.41 |   91.52 |                                                                
  files.js      |   98.94 |    93.55 |     100 |   98.94 | 171,413                                                        
  index.js      |   83.78 |    57.14 |   90.91 |   83.78 | 44,63,83-85,97                                                 
  prompts.js    |   80.15 |    58.16 |   79.49 |   82.81 | 74,111-112,125,135,143-147,156,215-224,243,311,349,365,370,378 
  utils.js      |   91.67 |    83.33 |     100 |   91.67 | 21-28,95                                                       
----------------|---------|----------|---------|---------|----------------------------------------------------------------

What could be tested that is not

  • all validate methods
  • catch blocks
  • multiple increments (see #71)
Motivation for or Use Case

Cover all the features of the generator.

Related issues or PR
  • Checking this box is mandatory (this is just to show you read everything)