UNPKG

@azure/microsoft-playwright-testing

Version:

Package to integrate your Playwright test suite with Microsoft Playwright Testing service

22 lines 1.17 kB
"use strict"; // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const path_1 = require("path"); const playwrightServiceEntra_1 = tslib_1.__importDefault(require("../playwrightServiceEntra")); const executor_1 = require("../../common/executor"); const customerConfig_1 = tslib_1.__importDefault(require("../../common/customerConfig")); const playwrightServiceGlobalSetupWrapper = async (config) => { const rootDir = config.configFile ? (0, path_1.dirname)(config.configFile) : process.cwd(); let customerGlobalSetupFunc = null; if (customerConfig_1.default.globalSetup && typeof customerConfig_1.default.globalSetup === "string") { customerGlobalSetupFunc = await (0, executor_1.loadCustomerGlobalFunction)(rootDir, customerConfig_1.default.globalSetup); } await playwrightServiceEntra_1.default.globalSetup(); if (customerGlobalSetupFunc) { return customerGlobalSetupFunc(config); } }; exports.default = playwrightServiceGlobalSetupWrapper; //# sourceMappingURL=playwright-service-global-setup.js.map