Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add unit tests for Nodemailer (#184)
* Add unit tests for nodemailer * Make adjustments to Nodemailer module to work wiht Unit Tests * Add Nodemailer env vars to CI * Add nodemailer env vars to docker compose * Add env vars in right place in CI * Remove nodemailer env vars * Add dotenv to test script * Remove dotenv import * return a promise with resolve/reject * Use objectContaining/arrayContaining to read response * Add mailhog under services * Remove nested Promise * Use objectContaining/arrayContaining in all notification tests * Remove test log message * Remove await and extra catch * Add await and remove catch * Eliminate test dependency * Remove types where they are already inferred * Test against the whole item array * Assign value to messageId inside if block to prevent typecheck fail * remove exclamation mark after messageId * remove if block * use invariant to throw if sentMailResponse.messageId is undefined * Add blank lines for better readibility * Pass responseToJSON.items directly to expect * Add cross-env to test script * Remove invariant
- Loading branch information