Skip to content

Commit

Permalink
update test handling of runtime error
Browse files Browse the repository at this point in the history
  • Loading branch information
mauris committed Aug 19, 2018
1 parent 8cd9bcd commit 7ed4e60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/programs/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ const chai = require('chai');
const expect = chai.expect;
require('mocha-sinon');

let testFunction = function testFunction(file, updateTimeout) {
let testFunction = function testFunction(file, updateTimeout, done) {
let errors = [];
return LPS.loadFile(path.join(__dirname, file + '.lps'))
.then((engine) => {
engine.on('error', (err) => {
errors.push(err);
done(err);
});
updateTimeout(engine.getMaxTime() * engine.getCycleInterval());
return engine.test(path.join(__dirname, file + '.spec.lps'));
Expand Down Expand Up @@ -68,7 +68,7 @@ describe('Programs Test', function () {
this.timeout(timeout + 2000);
};

testFunction(file, updateTimeout)
testFunction(file, updateTimeout, done)
.then(() => {
done();
})
Expand Down

0 comments on commit 7ed4e60

Please sign in to comment.