playwright-performance
Version:
Playwright plugin for analyzing test flow performance
19 lines (18 loc) • 786 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.playwrightPerformance = void 0;
const performance_main_1 = require("./performance-main");
const _playwrightPerformance = {
performance: async ({ browserName }, use, testInfo) => {
const performance = new performance_main_1.PerformanceMain();
await use(performance);
await performance.finalizeTest(browserName, testInfo);
},
worker: async ({ performanceOptions }, use, workerInfo) => {
const performance = new performance_main_1.PerformanceMain(performanceOptions);
await performance.initialize();
await use();
await performance.analyzeResults(workerInfo.workerIndex);
}
};
exports.playwrightPerformance = _playwrightPerformance;