Skip to content

Do not override config.mocha.grep when running test without --grep option #2459

@nataouze

Description

@nataouze

The current behavior

      const mochaConfig: MochaOptions = {
        ...config.mocha,
        grep: taskArgs.grep,
      };

prevents plugins from making use of config.mocha.grep as it will be unset if the option is not coming from the cli.

I would suggest this type of logic instead

      if (taskArgs.grep !== undefined) {
        mochaConfig.grep = taskArgs.grep;
      }

Metadata

Metadata

Assignees

Labels

type:bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions