Innovenergy_trunk/frontend/node_modules/testcafe/lib/services/serialization/prepare-options.js

23 lines
2.3 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 option_names_1 = __importDefault(require("../../configuration/option-names"));
const NECESSARY_OPTIONS = [
option_names_1.default.assertionTimeout,
option_names_1.default.speed,
option_names_1.default.pageLoadTimeout,
option_names_1.default.disableMultipleWindows,
option_names_1.default.userVariables,
];
function default_1(value) {
const result = Object.create(null);
NECESSARY_OPTIONS.forEach(optionName => {
result[optionName] = value[optionName];
});
return result;
}
exports.default = default_1;
module.exports = exports.default;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJlcGFyZS1vcHRpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL3NlcnZpY2VzL3NlcmlhbGl6YXRpb24vcHJlcGFyZS1vcHRpb25zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQ0Esb0ZBQTJEO0FBRTNELE1BQU0saUJBQWlCLEdBQUc7SUFDdEIsc0JBQVcsQ0FBQyxnQkFBZ0I7SUFDNUIsc0JBQVcsQ0FBQyxLQUFLO0lBQ2pCLHNCQUFXLENBQUMsZUFBZTtJQUMzQixzQkFBVyxDQUFDLHNCQUFzQjtJQUNsQyxzQkFBVyxDQUFDLGFBQWE7Q0FDNUIsQ0FBQztBQUVGLG1CQUF5QixLQUE4QjtJQUNuRCxNQUFNLE1BQU0sR0FBRyxNQUFNLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxDQUFDO0lBRW5DLGlCQUFpQixDQUFDLE9BQU8sQ0FBQyxVQUFVLENBQUMsRUFBRTtRQUNuQyxNQUFNLENBQUMsVUFBVSxDQUFDLEdBQUcsS0FBSyxDQUFDLFVBQVUsQ0FBQyxDQUFDO0lB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