Open znewsham opened 6 years ago
It seems that this is worse than I thought, I can't get any collection to stub correctly (on the server, not sure about client):
import StubCollections from 'meteor/hwillson:stub-collections';
var test = new Mongo.Collection("test");
StubCollections.stub([test]);
test.insert({test: "test"});
console.log(test.findOne());//logs undefined
+1
@znewsham Any chance you could link to a small runnable reproduction that demonstrates this?
@hwillson I actually can't - I guess it has something to do with the other packages I'm using. I've tried adding the usual culprits (collections2, simple schema, hooks, etc) - but can't get this to repeat. I'm in the process of updating my meteor apps to 1.7, once I'm done doing that I'll confirm if this still exists.
I had this when using another package which has lai:collection-extensions
or another package, replacing the Mongo.Collection
constructor.
As the title says, no error is thrown (sync or async) an _id is returned, but the record isn't actually created.