fdelbrayelle / generator-jhipster-kafka

A JHipster module that generates Apache Kafka consumers and producers and more!
Apache License 2.0
28 stars 10 forks source link

Improve generator tests #84

Open fdelbrayelle opened 4 years ago

fdelbrayelle commented 4 years ago
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

Motivation for or Use Case

Cover all the features of the generator.

Related issues or PR