typeorm tests are creating a new db connection in each test. If something goes wrong (assertion fails, exception thrown), the test does not close this connection which causes the following tests to fail as well.
We need to move the logic into afterEach hook so tests clean the environment after they are done for whatever reason.
typeorm tests are creating a new db connection in each test. If something goes wrong (assertion fails, exception thrown), the test does not close this connection which causes the following tests to fail as well. We need to move the logic into
afterEach
hook so tests clean the environment after they are done for whatever reason.