My “Can perform a country search for three countries” test is failing - but only the second condition. In other words, I’m getting the right number of records, but then something is breaking down as it relates to the expectedKeys.
It appears to me that I’m returning an array of the entire documents instead of just the title and _id.
I thought that this would be as simple as having the correct project parameter in the find statement. I wonder if it has anything to do with this post:
Is the point here that you can’t pass project in as a parameter to find() when working in Node?
I tried passing cursor (after the find()) through an agg pipeline with a project stage, but that is making my first test fail, as well as the first expect statement in the second test.