From: Alexander Alekhin Date: Wed, 15 Nov 2017 20:46:38 +0000 (+0000) Subject: js: fix tests (qunit -> node-qunit) X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~402^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2210ed4fdd2717ba5b3450c38a70199a9d9d59ff;p=platform%2Fupstream%2Fopencv.git js: fix tests (qunit -> node-qunit) --- diff --git a/modules/js/test/package.json b/modules/js/test/package.json index cb303ba..2a87372 100644 --- a/modules/js/test/package.json +++ b/modules/js/test/package.json @@ -3,7 +3,7 @@ "description": "Tests for opencv js bindings", "version": "1.0.0", "dependencies" : { - "qunit" : "latest" + "node-qunit" : "latest" }, "devDependencies": { "eslint" : "latest", @@ -18,7 +18,7 @@ }, "keywords": [], "author": "", - "license": "BSD-4-Clause", + "license": "BSD-3-Clause", "bugs": { "url": "https://github.com/opencv/opencv/issues" }, diff --git a/modules/js/test/tests.js b/modules/js/test/tests.js index cae9bac..4ddfa3b 100644 --- a/modules/js/test/tests.js +++ b/modules/js/test/tests.js @@ -38,7 +38,7 @@ // the use of this software, even if advised of the possibility of such damage. // -let testrunner = require('qunit'); +let testrunner = require('node-qunit'); testrunner.options.maxBlockDuration = 20000; // cause opencv_js.js need time to load testrunner.run( @@ -49,5 +49,10 @@ testrunner.run( }, function(err, report) { console.log(report.failed + ' failed, ' + report.passed + ' passed'); + if (report.failed) { + process.on('exit', function() { + process.exit(1); + }); + } } );