Innovenergy_trunk/frontend/node_modules/testcafe/lib/proxyless/add-custom-debug-formatters.js

22 lines
3.1 KiB
JavaScript

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const debug_1 = __importDefault(require("debug"));
const cdp_1 = require("./utils/cdp");
function default_1() {
debug_1.default.formatters.r = (event) => {
const requestStr = (0, cdp_1.isRequest)(event) ? 'request' : 'response';
return `requestPaused ${event.networkId} ${event.requestId} ${requestStr} ${event.request.url}`;
};
debug_1.default.formatters.f = (event) => {
return `frameNavigated ${event.frame.url} ${event.type}`;
};
debug_1.default.formatters.l = (event) => {
return `loadingFailed ${event.requestId} ${event.errorText}`;
};
}
exports.default = default_1;
module.exports = exports.default;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRkLWN1c3RvbS1kZWJ1Zy1mb3JtYXR0ZXJzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3Byb3h5bGVzcy9hZGQtY3VzdG9tLWRlYnVnLWZvcm1hdHRlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxrREFBMEI7QUFLMUIscUNBQXdDO0FBR3hDO0lBQ0ksZUFBSyxDQUFDLFVBQVUsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxLQUF5QixFQUFVLEVBQUU7UUFDdkQsTUFBTSxVQUFVLEdBQUcsSUFBQSxlQUFTLEVBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUMsVUFBVSxDQUFDO1FBRTdELE9BQU8saUJBQWlCLEtBQUssQ0FBQyxTQUFTLElBQUksS0FBSyxDQUFDLFNBQVMsSUFBSSxVQUFVLElBQUksS0FBSyxDQUFDLE9BQU8sQ0FBQyxHQUFHLEVBQUUsQ0FBQztJQUNwRyx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