Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 14
    Make sure you have the correct version installed for this. This feature is only supported for 27.0+ Commented Nov 29, 2021 at 8:31
  • 1
    it is not working for me with version "jest": "^27.1.0", example test.each(cases)('$variable', (a: number, b: number, expected: boolean) => { expect(isInGroup(a, 3, b, 3)).toBe(expected); }); Commented Jan 19, 2022 at 16:49
  • 2
    Same with me for version 28.1.2, it just prints out '$type.name' instead of the object's name Commented Apr 21, 2023 at 17:55
  • jestjs.io/blog/2018/05/29/… seems to indicate that all you need is at least v23. but if that doesn't work you can use jest-each separately. Commented Nov 18, 2024 at 5:07
  • so for v26: jest-archive-august-2023.netlify.app/docs/26.x/… v27: jest-archive-august-2023.netlify.app/docs/27.x/api/… and v28: jest-archive-august-2023.netlify.app/docs/28.x/… Which means yes: you can use it.each or describe.each. but if you want dot notation in your descriptions, then you need v27 at least. Commented Nov 18, 2024 at 5:08