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.
This package performs detection based on
describeanditcalls 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:
describe/itvariables 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.@playwright/testorplaywright. medium chance for false negatives, low chance for false positives. helps only test runners that we put into the detection logic.