Skip to content

Commit

Permalink
fix: ci npm test (#79)
Browse files Browse the repository at this point in the history
closes #78
  • Loading branch information
fdelbrayelle authored Jun 6, 2020
1 parent e60b20e commit cc3d58c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
20 changes: 12 additions & 8 deletions generators/app/prompts.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,19 @@ function askForOperations(context) {
];

const done = context.async();
context.prompt(prompts).then(props => {
context.props.generationType = props.generationType;
if (props.generationType === constants.INCREMENTAL_MODE) {
askForIncrementalOperations(context, done);
} else {
askForBigBangOperations(context, done);
}
try {
context.prompt(prompts).then(props => {
context.props.generationType = props.generationType;
if (props.generationType === constants.INCREMENTAL_MODE) {
askForIncrementalOperations(context, done);
} else {
askForBigBangOperations(context, done);
}
});
} catch (e) {
context.error('An error occurred while asking for operations', e);
done();
});
}
}

function askForBigBangOperations(context, done) {
Expand Down
6 changes: 3 additions & 3 deletions test/app.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('JHipster generator kafka', () => {
});
});

describe('with the big bang mode only', () => {
describe('with the big bang mode', () => {
describe('with a consumer and a producer for a single entity', () => {
before(done => {
helpers
Expand Down Expand Up @@ -142,7 +142,7 @@ describe('JHipster generator kafka', () => {
});
});

describe('with the incremental mode only', () => {
describe('with the incremental mode', () => {
describe('with only a producer for a single entity', () => {
before(done => {
helpers
Expand Down Expand Up @@ -437,7 +437,7 @@ describe('JHipster generator kafka', () => {
});
});

describe('with a previous generation done', () => {
describe('with an existing previous generation', () => {
describe('with only a consumer for a single entity', () => {
before(done => {
helpers
Expand Down

0 comments on commit cc3d58c

Please sign in to comment.