UNPKG

@rushstack/heft

Version:

Build all your JavaScript projects the same way: A way that works.

33 lines 927 B
"use strict"; // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. Object.defineProperty(exports, "__esModule", { value: true }); exports.MockScopedLogger = void 0; /** * Implementation of IScopedLogger for use by unit tests. * * @internal */ class MockScopedLogger { constructor(terminal) { this.errors = []; this.warnings = []; this.loggerName = 'mockLogger'; this.terminal = terminal; } get hasErrors() { return this.errors.length > 0; } emitError(error) { this.errors.push(error); } emitWarning(warning) { this.warnings.push(warning); } resetErrorsAndWarnings() { this.errors.length = 0; this.warnings.length = 0; } } exports.MockScopedLogger = MockScopedLogger; //# sourceMappingURL=MockScopedLogger.js.map