add thens to catch errors

This commit is contained in:
Jonathan Rainville 2018-09-13 15:56:36 -04:00
parent fdeac8bede
commit 293fce63a9
1 changed files with 4 additions and 3 deletions

View File

@ -137,9 +137,10 @@ module.exports = {
}
console.log(`Coverage report created. You can find it here: ${fs.dappPath('coverage/index.html')}\n`);
const opn = require('opn');
opn(fs.dappPath('coverage/index.html'));
setTimeout(next, 1000); // Slight delay to enable the browser to open. opn's promise calls too fast
const _next = () => { next(); };
opn(fs.dappPath('coverage/index.html'), {wait: false})
.then(() => new Promise(resolve => setTimeout(resolve, 1000)))
.then(_next, _next);
});
}
], (err) => {