Innovenergy_trunk/frontend/node_modules/testcafe/lib/api/test-controller/add-message.js

22 lines
2.7 KiB
JavaScript
Raw Normal View History

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.addErrors = exports.addWarnings = void 0;
const add_rendered_warning_1 = __importDefault(require("../../notifications/add-rendered-warning"));
function addWarnings(callsiteSet, message, testRun) {
callsiteSet.forEach(callsite => {
(0, add_rendered_warning_1.default)(testRun.warningLog, message, callsite);
callsiteSet.delete(callsite);
});
}
exports.addWarnings = addWarnings;
function addErrors(callsiteSet, ErrorClass, errList) {
callsiteSet.forEach(callsite => {
errList.addError(new ErrorClass(callsite));
callsiteSet.delete(callsite);
});
}
exports.addErrors = addErrors;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkLW1lc3NhZ2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvYXBpL3Rlc3QtY29udHJvbGxlci9hZGQtbWVzc2FnZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSxvR0FBMEU7QUFJMUUsU0FBZ0IsV0FBVyxDQUFFLFdBQXFDLEVBQUUsT0FBZSxFQUFFLE9BQWdCO0lBQ2pHLFdBQVcsQ0FBQyxPQUFPLENBQUMsUUFBUSxDQUFDLEVBQUU7UUFDM0IsSUFBQSw4QkFBa0IsRUFBQyxPQUFPLENBQUMsVUFBVSxFQUFFLE9BQU8sRUFBRSxRQUFRLENBQUMsQ0FBQztRQUMxRCxXQUFXLENBQUMsTUFBTSxDQUFDLFFBQVEsQ0FBQyxDQUFDO0lBQ2pDLENBQUMsQ0FBQyxDQUFDO0FBQ1AsQ0FBQztBQUxELGtDQUtDO0FBRUQsU0FBZ0IsU0FBUyxDQUFFLFdBQXFDLEVBQUUsVUFBZSxFQUFFLE9BQTBCO0l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