Merge pull request #14229 from brendandahl/term-log

Add an easy way to log to the terminal during browser tests.
This commit is contained in:
Tim van der Meij 2021-11-19 19:48:59 +01:00 committed by GitHub
commit b1e9e214bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -485,6 +485,24 @@ var Driver = (function DriverClosure() {
}, this.delay); }, this.delay);
}, },
/**
* A debugging tool to log to the terminal while tests are running.
* XXX: This isn't currently referenced, but it's useful for debugging so
* do not remove it.
*
* @param {string} msg - The message to log, it will be prepended with the
* current PDF ID if there is one.
*/
log(msg) {
let id = this.browser;
const task = this.manifest[this.currentTask];
if (task) {
id += `-${task.id}`;
}
this._info(`${id}: ${msg}`);
},
_nextTask() { _nextTask() {
let failure = ""; let failure = "";