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

Test multiple increment in incremental mode #71

Open fdelbrayelle opened 4 years ago

fdelbrayelle commented 4 years ago
Overview of the issue

It should have some tests in app.spec.js to test multiple loop increment in incremental mode.

Motivation for or Use Case

Currently there is only tests for one loop turn in incremental mode. This is configured like this in app.spec.js:

continueAddingEntitiesComponents: false
Suggest a Fix

Add some tests with:

continueAddingEntitiesComponents: true

And find a trick to loop in incremental mode in test scope like call again helpers in the 'end' event like this:

                .on('end', () => {
                    helpers
                        .run(path.join(__dirname, '../generators/upgrade'))
                        // ...
                        .on('end', done);
                });
JHipster Version(s)

6.9.0

monxxi commented 4 years ago

yes, i already tried this approach, but i didn't manage to call the helpers withPrompts a second time in a callback provided in the on() 'method'.