/** * Wrapper function to define Cucumber reporter in a type-safe way in Playwright config. * * Examples: * reporter: [cucumberReporter('html', { outputFile: 'cucumber-report.html' })], * reporter: [cucumberReporter('./reporter.ts', { foo: 'bar' })], */ import type { BuiltinReporters, CucumberReporterOptions } from '.'; export function cucumberReporter( type: T, userOptions?: CucumberReporterOptions, ): [string, unknown] { return ['playwright-bdd/reporter/cucumber', { $type: type, ...(userOptions || {}) }] as const; }