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.timeout(0);
|
||||||
|
|
||||||
mocha.suite.beforeAll('Wait for deploy', (done) => {
|
mocha.suite.beforeAll('Wait for deploy', (done) => {
|
||||||
global.embark.onReady(() => {
|
global.embark.onReady((err) => {
|
||||||
done();
|
done(err);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -117,6 +117,9 @@ class Test {
|
||||||
this.events.once('ready', () => {
|
this.events.once('ready', () => {
|
||||||
callback();
|
callback();
|
||||||
});
|
});
|
||||||
|
this.events.once('deployError', (err) => {
|
||||||
|
callback(err);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
config(options, callback) {
|
config(options, callback) {
|
||||||
|
@ -175,12 +178,12 @@ class Test {
|
||||||
},
|
},
|
||||||
function deploy(next) {
|
function deploy(next) {
|
||||||
self._deploy(options, (err, accounts) => {
|
self._deploy(options, (err, accounts) => {
|
||||||
self.ready = true;
|
|
||||||
self.events.emit('ready');
|
|
||||||
if (err) {
|
if (err) {
|
||||||
console.error(err.red);
|
self.events.emit('deployError', err);
|
||||||
return next(err);
|
return next(err);
|
||||||
}
|
}
|
||||||
|
self.ready = true;
|
||||||
|
self.events.emit('ready');
|
||||||
next(null, accounts);
|
next(null, accounts);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue