Perhaps in the jest test, create query behaves laz...
# orm-help
k
Perhaps in the jest test, create query behaves lazy. (Is my guess right? ??) Can you tell me how to solve it?
r
No it’s not lazy as you’re using
await
. This should work fine. Can you log
school
inside the
signUp
method and check?
👍 1
💯 1
k
You are right. I solved the problem. I was using it incorrectly when using dot env cli.
Copy code
//package.json
"test:local": dotenv -e ./dotenv/local.env jest --detectOpenHandles --forceExit --runInBand  // only  jest (option not working) 

"test:local": dotenv -e ./dotenv/local.env -- jest --detectOpenHandles --forceExit --runInBand //  jest --detectOpenHandles --forceExit --runInBand
There are several tests. I initialize the database every test. I was mistaken because there was data left in the database.
💯 1
It was a problem caused by jest running in parallel. thanks for the answer
👍 1