1
1
mirror of https://github.com/ariya/phantomjs.git synced 2024-09-11 04:46:09 +03:00

examples/run-jasmine2.js: Avoid exception when no tests were run.

When all tests were skipped, or when no tests were found, run-jasmine2.js
would raise an exception because ".alert > .bar.passed" doesn't exist. As
".alert > .bar.skipped" exists instead, and has similar interesting
content, let's use it!
This commit is contained in:
Paul Morelle 2015-11-25 08:39:29 +01:00 committed by Zack Weinberg
parent 668d8a42f7
commit e2a048a82c

View File

@ -83,7 +83,7 @@ page.open(system.args[1], function(status){
}
return 1;
} else {
console.log(document.body.querySelector('.alert > .bar.passed').innerText);
console.log(document.body.querySelector('.alert > .bar.passed,.alert > .bar.skipped').innerText);
return 0;
}
});