Skip to content

Commit 0eb1bfa

Browse files
committed
Merge pull request opencv#10099 from alalek:fix_js_tests
2 parents 3c6983a + 2210ed4 commit 0eb1bfa

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

modules/js/test/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Tests for opencv js bindings",
44
"version": "1.0.0",
55
"dependencies" : {
6-
"qunit" : "latest"
6+
"node-qunit" : "latest"
77
},
88
"devDependencies": {
99
"eslint" : "latest",
@@ -18,7 +18,7 @@
1818
},
1919
"keywords": [],
2020
"author": "",
21-
"license": "BSD-4-Clause",
21+
"license": "BSD-3-Clause",
2222
"bugs": {
2323
"url": "https://github.com/opencv/opencv/issues"
2424
},

modules/js/test/tests.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
// the use of this software, even if advised of the possibility of such damage.
3939
//
4040

41-
let testrunner = require('qunit');
41+
let testrunner = require('node-qunit');
4242
testrunner.options.maxBlockDuration = 20000; // cause opencv_js.js need time to load
4343

4444
testrunner.run(
@@ -49,5 +49,10 @@ testrunner.run(
4949
},
5050
function(err, report) {
5151
console.log(report.failed + ' failed, ' + report.passed + ' passed');
52+
if (report.failed) {
53+
process.on('exit', function() {
54+
process.exit(1);
55+
});
56+
}
5257
}
5358
);

0 commit comments

Comments
 (0)