spacefill / gibbon-mail

Send mails with mjml Template and JSON Schema
3 stars 1 forks source link

Backend tests are broken #17

Closed Its-Alex closed 3 years ago

Its-Alex commented 3 years ago

When I tried to run backend test I have an error:

➜  backend git:(master) ✗ yarn run test
yarn run v1.22.10
$ eslint --ignore-path .gitignore .
$ jest
 FAIL  test/routes.test.js
  ● Test suite failed to run

    TypeError: config.get is not a function

      1 | const getSmtpUrl = (config) => {
      2 |     if (
    > 3 |         config.get('smtp.username') &&
        |                ^
      4 |         config.get('smtp.password') &&
      5 |         config.get('smtp.host') &&
      6 |         config.get('smtp.port')

      at getSmtpUrl (src/utils.js:3:16)
      at createApp (src/app.js:279:9)
      at Object.<anonymous> (test/routes.test.js:7:13)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        0.694 s
Ran all test suites.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.