mirror of https://github.com/embarklabs/embark.git
don't continue testing file if there was deploy errors; avoids unrelated errors for each 'it'
This commit is contained in:
parent
3db8ccd44e
commit
ede4926069
|
@ -83,8 +83,8 @@ module.exports = {
|
|||
mocha.suite.timeout(0);
|
||||
|
||||
mocha.suite.beforeAll('Wait for deploy', (done) => {
|
||||
global.embark.onReady(() => {
|
||||
done();
|
||||
global.embark.onReady((err) => {
|
||||
done(err);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -117,6 +117,9 @@ class Test {
|
|||
this.events.once('ready', () => {
|
||||
callback();
|
||||
});
|
||||
this.events.once('deployError', (err) => {
|
||||
callback(err);
|
||||
});
|
||||
}
|
||||
|
||||
config(options, callback) {
|
||||
|
@ -175,12 +178,12 @@ class Test {
|
|||
},
|
||||
function deploy(next) {
|
||||
self._deploy(options, (err, accounts) => {
|
||||
self.ready = true;
|
||||
self.events.emit('ready');
|
||||
if (err) {
|
||||
console.error(err.red);
|
||||
self.events.emit('deployError', err);
|
||||
return next(err);
|
||||
}
|
||||
self.ready = true;
|
||||
self.events.emit('ready');
|
||||
next(null, accounts);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue