Skip to content

[Bug]: grep-invert fails to ignore tests with a tag when the test is part of a dependent project #35379

@michaelchiche

Description

@michaelchiche

Version

v1.51.1

Steps to reproduce

  1. Clone & install dependencies from this repo: https://github.com/michaelchiche/playwright-invert-grep-question
  2. run pnpm exec playwright test -gv @skip

Expected behavior

When running the command, 3 tests are ran, the 2 from setup project and 1 from tests project.
Both tests are ran in setup project even though one of them has the @skip tag.

It works correctly when I remove the setup project dependency from the tests project.

Maybe it's the expected behavior, but if it is, I think it needs to be clarified somewhere in the documentation

Actual behavior

Only the tests without the @skip tag in both projects should be ran

Additional context

No response

Environment

System:
  OS: macOS 15.3.2
  CPU: (12) arm64 Apple M4 Pro
  Memory: 116.25 MB / 24.00 GB
Binaries:
  Node: 22.14.0 - ~/.volta/tools/image/node/22.14.0/bin/node
  npm: 11.1.0 - ~/.volta/tools/image/npm/11.1.0/bin/npm
  pnpm: 10.6.5 - ~/.volta/bin/pnpm
  bun: 1.2.6 - ~/.bun/bin/bun
IDEs:
  VSCode: 1.98.2 - /usr/local/bin/code
Languages:
  Bash: 3.2.57 - /bin/bash
npmPackages:
  @playwright/test: ^1.51.1 => 1.51.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions