79412477

Date: 2025-02-04 17:12:05
Score: 1
Natty:
Report link

I end-up here looking for some info about expect.assertions.

If useful, I think I'm using a different strategy to test error cases that don't need expect.assertions at all:

it("should login", async () => {
  // arrange
  const login = "login";
  const password = "password";
  // act & assert
  await expect(login(email, password))
    .rejects
    .toThrow("failed to login");
});

Cheers!

Reasons:
  • Blacklisted phrase (1): Cheers
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: benjaroa