Reorder promises

This commit is contained in:
Jim Laurie 2018-01-10 14:45:32 +01:00
parent fbd17f4205
commit bf7daaf99a

View File

@ -53,7 +53,6 @@ module.exports = (scope, cb) => {
scope.database = {}; scope.database = {};
const connectionValidation = () => { const connectionValidation = () => {
let formSteps = new Promise(resolve => {
const databaseChoises = [ const databaseChoises = [
{ {
name: 'MongoDB (highly recommended)', name: 'MongoDB (highly recommended)',
@ -120,11 +119,6 @@ module.exports = (scope, cb) => {
options: {} options: {}
}); });
resolve();
});
});
formSteps = formSteps.then(() => {
const asyncFn = [ const asyncFn = [
new Promise(resolve => { new Promise(resolve => {
inquirer inquirer
@ -186,6 +180,8 @@ module.exports = (scope, cb) => {
scope.database.username = answers.username; scope.database.username = answers.username;
scope.database.password = answers.password; scope.database.password = answers.password;
logger.info('Testing database connection...');
resolve(); resolve();
}); });
}), }),