Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(): E2E tests #79

Merged
merged 3 commits into from
Sep 20, 2021
Merged

fix(): E2E tests #79

merged 3 commits into from
Sep 20, 2021

Conversation

antennaio
Copy link
Contributor

@antennaio antennaio commented Sep 19, 2021

Problem:

Currently the only E2E test fails with the following error (yarn run test:e2e ):

expected 200 "OK", got 404 "Not Found"

Additionally, there’s an issue that is caused by the keepConnectionAlive TypeOrm module option.

Jest did not exit one second after the test run has completed.

This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with --detectOpenHandles to troubleshoot this issue.

Solution:

  • Add support for a separate database for tests
  • Drop the schema and rebuild the tables on each run
  • Disable keepConnectionAlive option when running tests
  • Fix failing test, add a few more working examples

Fixes #16

@antennaio antennaio changed the title Fix E2E tests fix(): E2E tests Sep 19, 2021
@antennaio antennaio mentioned this pull request Sep 19, 2021
@NarHakobyan
Copy link
Owner

Hi @antennaio, well done, thanks. :)

@NarHakobyan NarHakobyan merged commit 606cb33 into NarHakobyan:master Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

e2e test and error
2 participants