I'm trying to write test (spec) on a mongo DB wrapper and stumbled on this weird issue. My code, build on top of a thin wrapper of mongodb, expose _id as string to the world but us
Solution 1:
Are you sure your fixtures aren't mangled between different tests?
And by the way shouldn't
return MongoDb.ObjectId(id);
be
return new MongoDb.ObjectId(id);
?
Share
Post a Comment
for "Mongodb Node.js Deleteone Via _id Doesn't Work On Objectid"
Post a Comment for "Mongodb Node.js Deleteone Via _id Doesn't Work On Objectid"