When Snapshot Testing Doesn’t Help
In this lesson, we will learn about the case in which Snapshot testing doesn't help at all.
We'll cover the following...
We'll cover the following...
Have you noticed that I didn’t mention anything about the third test? To remember it, let’s check it again:
Press + to interact
it("should emit a contact-click with its id when the component is clicked", () => {const cmp = createContactBox(0, "John", "Doe", false);cmp.trigger("click");const payload = cmp.emitted("contact-click")[0][0];expect(payload).toBe(0);});
In this case, when ...