Understanding a Matcher

Learn about matchers and their benefits in this lesson.

Matcher example

We have been using matchers in most of the lessons in this course so far. What do you think the matcher is in the test below?

test("Should return true when valid email", () => {
  const result = isEmail("someone@somewhere.com");
  expect(result).toBe(true);
});

Get hands-on with 1200+ tech skills courses.