Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MongoInternals is not defined #17

Open
lnmunhoz opened this issue Aug 12, 2016 · 1 comment
Open

MongoInternals is not defined #17

lnmunhoz opened this issue Aug 12, 2016 · 1 comment

Comments

@lnmunhoz
Copy link

lnmunhoz commented Aug 12, 2016

I am trying to use this package in a package test that uses practicalmeteor:mocha as the test runner. My test is server side only when I am getting the following error:

Error: MongoInternals is not defined
    at resetDatabase (packages/xolvio_cleaner/packages/xolvio_cleaner.js:22:1)
    at Hook.<anonymous> (packages/local-test:tdb:organizations/tests/methods.js:8:7)
    at run (packages/practicalmeteor:mocha-core/server.js:56:16)

This is my Package.onTest:

Package.onTest(function(api) {
  api.use([
    'ecmascript',
    'mongo',
    'practicalmeteor:mocha',
    'xolvio:cleaner',
    'practicalmeteor:chai',
    'tdb:organizations'
  ]);
  api.addFiles([
   'tests/index.js',
   'tests/methods.js'
  ]);
});

What could be wrong?

UPDATE - 5 minutes later
I could make my test work by not using this package with the following approach:

if (Meteor.isServer) {
  Meteor.methods({
    'test.cleanOrganizations': () => Organizations.remove({})
  });

  describe('tdb:organizations - methods', () => {
    beforeEach( done => {
      Meteor.call('test.cleanOrganizations', done);
    });
...

So I think the problem is not related with the mongo dependency because my collection is using it.

@lnmunhoz
Copy link
Author

lnmunhoz commented Oct 6, 2016

Keep the same problems... No help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant