Page(s)
jest docs website: https://jestjs.io/docs/expect#tocontainitem
documentation that shows up in IDE: https://github.com/jestjs/jest/blob/main/packages/expect/src/types.ts#L211
Description
The jest documentation page for expect.toContain(item) states:
Use .toContain when you want to check that an item is in an array. For testing the items in the
array, this uses ===, a strict equality check. .toContain can also check whether a string is a substring of another string.
But in the comments in jest/packages/expect/src/types.ts file (which is what shows up when hovering over expect matchers in the IDE), it only mentions that it can check if an item is in a list.
This meant a user cannot know it worked for asserting substrings from within the IDE and had to open the docs in a browser to find out