Merge pull request #7028 from spalger/implement/consoleLikeLogging
[function tests] console like logging api
This commit is contained in:
commit
187882de57
|
@ -9,6 +9,7 @@ export default (function () {
|
|||
var _ = require('lodash');
|
||||
var parse = require('url').parse;
|
||||
var format = require('url').format;
|
||||
var util = require('util');
|
||||
var path = require('path');
|
||||
|
||||
function injectTimestampQuery(func, url) {
|
||||
|
@ -223,12 +224,12 @@ export default (function () {
|
|||
return this.tryForTime(defaultFindTimeout, block);
|
||||
},
|
||||
|
||||
log: function log(logString) {
|
||||
console.log(moment().format('HH:mm:ss.SSS') + ': ' + logString);
|
||||
log(...args) {
|
||||
console.log(moment().format('HH:mm:ss.SSS') + ':', util.format(...args));
|
||||
},
|
||||
|
||||
debug: function debug(logString) {
|
||||
if (config.debug) this.log(logString);
|
||||
debug(...args) {
|
||||
if (config.debug) this.log(...args);
|
||||
},
|
||||
|
||||
sleep: function sleep(sleepMilliseconds) {
|
||||
|
|
Loading…
Reference in a new issue