I kind of feel like there could be more assertions in your final it block though than just, "expect ... to not throw".
To me it would be great if there was some was to look inside the mongo memory lib and say something like, "expect the fake mongoDb's collection to now have that additional document that I inserted".
Thanks!
I completely agree. I actually added an extra test to check if the product exists after creating it on the repo, but didn't include it here because I wanted to keep the examples for the article simple.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice article Paula!
I kind of feel like there could be more assertions in your final it block though than just, "expect ... to not throw".
To me it would be great if there was some was to look inside the mongo memory lib and say something like, "expect the fake mongoDb's collection to now have that additional document that I inserted".
Thanks!
I completely agree. I actually added an extra test to check if the product exists after creating it on the repo, but didn't include it here because I wanted to keep the examples for the article simple.