Is it possible to combine multiple conditions inside an expect in React Testing Library?

Viewed 19

For example, there are two expect conditions like these:

expect(firstItem).toHaveClass(firstStyle);
expect(firstItem).not.toHaveClass(secondStyle);

Is there a way to make them in one line? Something like:

expect(firstItem).toHaveClass(firstStyle).and.not.toHaveClass(secondStyle);
0 Answers
Related