UNPKG

@serenity-js/webdriverio

Version:

Adapter that integrates @serenity-js/web with the latest stable version of WebdriverIO, enabling Serenity/JS reporting and using the Screenplay Pattern to write web and mobile test scenarios

29 lines 691 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.OutputStreamBuffer = void 0; /** * @package */ class OutputStreamBuffer { prefix; buffer = ''; constructor(prefix) { this.prefix = prefix; } write(content) { this.buffer += content; } hasContent() { return this.buffer !== ''; } flush() { const prefixedContent = this.buffer .split('\n') .map(line => `${this.prefix} ${line}\n`) .join(''); this.buffer = ''; return prefixedContent; } } exports.OutputStreamBuffer = OutputStreamBuffer; //# sourceMappingURL=OutputStreamBuffer.js.map