hackerAPI icon indicating copy to clipboard operation
hackerAPI copied to clipboard

Fix unit tests

Open jackyyzhang03 opened this issue 1 year ago • 1 comments

Currently some unit tests are failing, we should investigate and fix them as necessary.

jackyyzhang03 avatar Jan 13 '24 02:01 jackyyzhang03

Seems there are a few commits that have caused the unit tests to break. I'll list them and what I've been able to gather.

  • e045828: Introducing secure option causes authentication issues with passport and chai during unit tests. Resolution: secure should be true in non-test environments (i.e., secure: !Services.env.isTest()
  • 01aec67: Some validation left out when introducing accommodation reason (i.e., no upper limit on amount any more). Renaming of field ("application.accommodation.travel" => "application.accomodation.travel.amount") caused issues with tests. Resolution: rename validation fields in tests and remove test against upper limit validation.
  • 2e3fd15: Disabling this validation led to some issues in tests that are expected to fail if the hacker's account is not confirmed. Resolution: Re-enable the validation.
  • a5e29a2: Same as above. Resolution: Same as above.

msohaill avatar Jan 21 '24 04:01 msohaill

Resolved through #926.

msohaill avatar Jun 11 '24 16:06 msohaill