Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for it.each and test.each #169

Closed
micthiesen opened this issue Jul 5, 2023 · 1 comment
Closed

Support for it.each and test.each #169

micthiesen opened this issue Jul 5, 2023 · 1 comment
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)

Comments

@micthiesen
Copy link

Is your feature request related to a problem? Please describe.
Currently this extension doesn't seem to recognize individual test.each test cases. For example:

describe("something", () => {
  test.each([
    { text: "bar", expected: "zoo" },
    { text: "moo", expected: "arf" },
  ])(
    "should properly parse '$expected' from '$text'",
    ({ text, expected }) => {
      expect(foo(text)).toEqual(expected)
    }
  );
});

For this test you will get an option to run/debug the describe block (works) and also the overall test function. If you click run/debug on the overall test function all the individual test cases are skipped. I think this is because the test runner is filtering on the template string: -t some.module.spec should properly parse '\$expected' from '\$text'

Sometimes the test statuses in the sidebar also hang, I believe when they contain a test.each or it.each.

Describe the solution you'd like
Add support for test.each / it.each, bot in the sidebar and in the run/debug breadcrumbs.

Describe alternatives you've considered
Currently I'm debugging these types of tests by commenting out all the other cases and using the debug button on the describe block.

@micthiesen micthiesen added the p2-nice-to-have Not breaking anything but nice to have (priority) label Jul 5, 2023
@micthiesen
Copy link
Author

Ah sorry just found #133. This is known.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
None yet
Development

No branches or pull requests

1 participant