Skip to content

Do not detect non-Jest tests #120

@Skn0tt

Description

@Skn0tt

This package performs detection based on describe and it calls in the AST, it doesn't check if those variables come from Jest though. In a repository that uses Jest, but also Playwright for end to end tests (like https://github.com/payloadcms/payload), this package will incorrectly detect those tests to be Jest tests. This can lead to misleading editor UI.

I'd be happy to contribute a fix for this. Here's a couple of possible approaches:

  • detect where the describe / it variables were bound, and check if they're global or were imported from @jest/globals. low chance for false positives, high chance for false negatives, and could be pretty complex. helps all non-Jest test runners.
  • bail if the file contains import / require statements for @playwright/test or playwright. medium chance for false negatives, low chance for false positives. helps only test runners that we put into the detection logic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions