Skip to content

_ensureIndex causes crash #26

Open
@cunneen

Description

@cunneen

If the collection I'm stubbing has a call to _ensureIndex (as per How to optimize your Mongo database for Meteor.js , I get the following error

Uncaught Error: Can only call _ensureIndex on server collections

at Mongo.Collection._ensureIndex (packages/mongo/collection.js:651:11)
at Object.invoke (.meteor/packages/hwillson_stub-collections/.1.0.6.1i286aa.gv4e++os+web.browser+web.cordova/npm/node_modules/sinon/lib/sinon/behavior.js:150:32)
at Mongo.Collection.functionStub (.meteor/packages/hwillson_stub-collections/.1.0.6.1i286aa.gv4e++os+web.browser+web.cordova/npm/node_modules/sinon/lib/sinon/stub.js:98:47)
at Function.invoke (.meteor/packages/hwillson_stub-collections/.1.0.6.1i286aa.gv4e++os+web.browser+web.cordova/npm/node_modules/sinon/lib/sinon/spy.js:193:47)
at Mongo.Collection.proxy [as _ensureIndex] (.meteor/packages/hwillson_stub-collections/.1.0.6.1i286aa.gv4e++os+web.browser+web.cordova/npm/node_modules/sinon/lib/sinon/spy.js:73:57)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions