Closed phkorn closed 5 years ago
You may follow to the new ava recipe: https://github.com/avajs/ava/blob/master/docs/recipes/endpoint-testing-with-mongoose.md
More discussion was here: https://github.com/avajs/ava/pull/1420#issuecomment-314377098
@nodkz thx for your fast replay, but I will give this repo a shot before switching to yours :wink:
@k0rn1 I'll try to replicate this in a test on my end and see if we can work to get it resolved. The package doesn't have huge uptake at the moment so it takes longer for little things like this to filter through.
@k0rn1 I have tried to replicate this but struggled so far. Can you checkout the develop branch and see if that works for you? If not are you able to supply a test case that proves the error exists?
Thanks!
Closing due to inactivity
Hi! I have following helper class for my tests using ava:
When the
teardown
inafter.always
is called the check in your codehelper.mongoBin.childProcess.connected
is false, so the kill on the childprocess doesn't get called.If I check on Ubuntu using
top -c -p $(pgrep -d',' -f mongo)
the mongo process is still running. If I skip the if-check and callhelper.mongoBin.childProcess.kill();
the server get's killed.Am I doing something wrong?