There are predefined matcher functions in Jest framework. But you also can define your own matchers.

Examples:

  • .toContain(), e.g. expect(document.body.textContent).toContain("Ashley");