UNPKG

@azure/microsoft-playwright-testing

Version:

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

22 lines 1.19 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 playwrightServiceGlobalTeardownWrapper = async (config) => { const rootDir = config.configFile ? (0, path_1.dirname)(config.configFile) : process.cwd(); let customerGlobalTeardownFunc = null; if (customerConfig_1.default.globalTeardown && typeof customerConfig_1.default.globalTeardown === "string") { customerGlobalTeardownFunc = await (0, executor_1.loadCustomerGlobalFunction)(rootDir, customerConfig_1.default.globalTeardown); } playwrightServiceEntra_1.default.globalTeardown(); if (customerGlobalTeardownFunc) { await customerGlobalTeardownFunc(config); } }; exports.default = playwrightServiceGlobalTeardownWrapper; //# sourceMappingURL=playwright-service-global-teardown.js.map