UNPKG

only-changed-jest-watch-plugin

Version:

Jest watch plugin for running either only the modified test (for TDD), or tests of dependant modules

47 lines (36 loc) 982 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var _preRunMessage; function _load_preRunMessage() { return (_preRunMessage = require('../preRunMessage')); } class BaseReporter { log(message) { process.stderr.write(message + '\n'); } onRunStart(results, options) { (0, (_preRunMessage || _load_preRunMessage()).remove)(process.stderr); } onTestResult(test, testResult, results) {} onTestStart(test) {} onRunComplete(contexts, aggregatedResults) {} _setError(error) { this._error = error; } // Return an error that occurred during reporting. This error will // define whether the test run was successful or failed. getLastError() { return this._error; } } exports.default = BaseReporter; /** * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * */