GoodDollar/GoodServer

Add detailed unit test for Verification.verifyMobile()

Opened this issue · 0 comments

We had an issue with incorrect expiration check (which have appeared after refactoring during new Zoom integration)

For prevent similar situations in the future we should test all cases:

  • empty code was passed
  • code doesnt matches
  • code was expired
await expect(verifyMobile(<test user>, { otp: <test OTP> })).rejects.toThrow('No code to validate, retry')
// other cases