e2ed
Version:
E2E testing framework over Playwright
21 lines (20 loc) • 702 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.step = void 0;
const fn_1 = require("./utils/fn");
const log_1 = require("./utils/log");
const test_1 = require("@playwright/test");
const noop = () => { };
/**
* Declares a test step (calls Playwright's `test.step` function inside).
*/
const step = (name, body = noop, options) => {
if (options?.skipLogs !== true) {
if (body !== noop) {
(0, fn_1.setCustomInspectOnFunction)(body);
}
(0, log_1.log)(name, { body: body === noop ? undefined : body, options }, 7 /* LogEventType.InternalCore */);
}
return test_1.test.step(name, body, options);
};
exports.step = step;