UNPKG

@applitools/eyes-playwright

Version:
19 lines (18 loc) 724 B
"use strict"; var _a; Object.defineProperty(exports, "__esModule", { value: true }); const nodeOptions = ((_a = process.env.NODE_DEBUG) !== null && _a !== void 0 ? _a : '').split(','); const supportedCategories = process.env.CI ? ['pw:api', 'test.step', 'expect'] : ['pw', 'hook', 'test.step', 'expect', 'fixture']; class DebugReporter { onStepEnd(_test, _result, step) { if (process.env.CI || nodeOptions.includes('playwright')) { if (supportedCategories.includes(step.category)) { // eslint-disable-next-line no-console console.log(` ~ ${step.category}: ${step.title} (${step.duration}ms)`); } } } } exports.default = DebugReporter;