ユニットテストを使用するときに問題が発生した冗談:
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.
考えられる原因:データベース接続のテストは、テストが閉じていない終了します。
ソリューション:
···
import * as mongoose from 'mongoose';
···
describe('AppController (e2e)', () => {
···
afterAll(async () => {
mongoose.disconnect();
});
})