ArangoQueryCursor.prototype.toString = function () { var rows = [ ], i = 0; while (++i <= 10 && this.hasNext()) { rows.push(this.next()); } var result = "[object ArangoQueryCursor"; if (this.data.id) { result += " " + this.data.id; } if (this._count !== null && this._count !== undefined) { result += ", count: " + this._count; } result += ", hasMore: " + (this.hasNext() ? "true" : "false"); result += "]"; if (rows.length > 0) { var old = internal.startCaptureMode(); internal.print(rows); result += "\n\n" + internal.stopCaptureMode(old); if (this.hasNext()) { result += "\ntype 'more' to show more documents\n"; more = this; // assign cursor to global variable more! } } return result; };
return "at assertion #" + counter + ": " + str.replace(/\?/g, function () { internal.startCaptureMode(); internal.print(a.shift()); var outputWithoutNewline = internal.stopCaptureMode(); return outputWithoutNewline.substr(0, outputWithoutNewline.length - 1); });
var log = function (a) { internal.startCaptureMode(); print(a); appender(internal.stopCaptureMode()); };