jedireza / mongo-models

:package: Map JavaScript classes to MongoDB collections
MIT License
67 stars 28 forks source link

MongoModels#aggregate does not pass test case #29

Closed andyfry01 closed 6 years ago

andyfry01 commented 6 years ago

Hi again!

As written, the aggregate method does not pass this test. The method as written returns the AggregationCursor instead of the results array.

I've got a small PR ready if you'd like to make the change.

Thanks, Andy

jedireza commented 6 years ago

Are you getting a failure using the latest master and the mongdb 2.0 driver? With a fresh install I'm getting all tests passing.

jedireza commented 6 years ago

Also, this test is also passing on the upcoming async branch (see: #25) using the mongodb 3.x driver.

andyfry01 commented 6 years ago

Hey @jedireza, after working on #27 I noticed that the tests weren't passing for that particular test, although that might just be something happening locally for me. If it's working for you after updating the mongodb driver then I'd imagine it's fine.