I have a node app that uses multiple databases. I created a separate connection and model for each database per the solution suggested here.
However, when I run my Jest unit tests for testing the validation methods on the model's schema, I get the following error (did not happen when I was using a single database, without calling createConnection()):
"Cannot log after tests are done. Did you forget to wait for something async in your test?". I understand that I'm getting this error since createConnection()is an async method.
My question is: how do I make both multiple databases and Jest work together?