Skip to content

Commit

Permalink
fix(console-reporter): corrected default export so that it's detected…
Browse files Browse the repository at this point in the history
… as no-arg

This will allow for configuring console reporter in Serenity/JS stage crew using a simple string
`@serenity-js/console-reporter` with no additional parameters

Related tickets: re #1240
  • Loading branch information
jan-molak committed Sep 27, 2022
1 parent 170a31e commit e39fc12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/console-reporter/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import { ConsoleReporter, ConsoleReporterConfig } from './stage';

export * from './stage';

export default function create({ theme = 'auto' }: ConsoleReporterConfig): StageCrewMemberBuilder<ConsoleReporter> {
return ConsoleReporter.fromJSON({ theme });
export default function create(config: ConsoleReporterConfig = undefined): StageCrewMemberBuilder<ConsoleReporter> {
return ConsoleReporter.fromJSON(config || { theme: 'auto' });
}

0 comments on commit e39fc12

Please sign in to comment.