mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
Fix chrome-qunit-test.js wasn't exiting with the right error code.
This commit is contained in:
parent
0f011e1c1c
commit
77fbb2306d
1 changed files with 6 additions and 6 deletions
12
vendor/assets/javascripts/run-qunit-chrome.js
vendored
12
vendor/assets/javascripts/run-qunit-chrome.js
vendored
|
@ -50,7 +50,7 @@ const CDP = require('chrome-remote-interface');
|
||||||
});
|
});
|
||||||
|
|
||||||
Page.loadEventFired(() => {
|
Page.loadEventFired(() => {
|
||||||
|
|
||||||
Runtime.evaluate({
|
Runtime.evaluate({
|
||||||
expression: `(${qunit_script})()`
|
expression: `(${qunit_script})()`
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
@ -62,19 +62,19 @@ const CDP = require('chrome-remote-interface');
|
||||||
console.error("Tests timed out");
|
console.error("Tests timed out");
|
||||||
|
|
||||||
protocol.close();
|
protocol.close();
|
||||||
chrome.kill();
|
chrome.kill();
|
||||||
process.exit(124);
|
process.exit(124);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
Runtime.evaluate({
|
Runtime.evaluate({
|
||||||
expression: `(${check_script})()`
|
expression: `(${check_script})()`
|
||||||
}).then((numFails) => {
|
}).then(numFails => {
|
||||||
if (numFails.result.type !== 'undefined') {
|
if (numFails.result.type !== 'undefined') {
|
||||||
clearInterval(interval);
|
clearInterval(interval);
|
||||||
protocol.close();
|
protocol.close();
|
||||||
chrome.kill();
|
chrome.kill();
|
||||||
|
|
||||||
if (numFails.value > 0) {
|
if (numFails.result.value > 0) {
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
} else {
|
} else {
|
||||||
process.exit();
|
process.exit();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue