jest-community / jest-editor-support

A module for handling editor to jest integration
MIT License
28 stars 21 forks source link

Bugfix: Recognize `it.only.each` and other chains off of it. #58

Closed TheSench closed 3 years ago

TheSench commented 3 years ago

This PR enhances parsing of it.each and describe.each by allowing them to also be found when deeper in a property chain (e.g. it.only.each, it.concurrent.only.each, describe.only.each). In addition, it also allows the Tagged Template Literal syntax of it.each and describe.each to be parsed.

It updates the logic that identifies it and describe blocks to walk up the callee chain to the root when there are multiple levels of callee (e.g. for it.each(scenarios)(name, fn)), and then to walk up the tag and object tree to the root (e.g. each->only->concurrent->it).

Jest API methods that should now be supported (from https://jestjs.io/docs/en/api):

Fixes #53 Fixes #59