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

TypeError: _meteorHwillsonStubCollections2.default.add is not a function #19

Open
aymericbouzy opened this issue Aug 31, 2017 · 1 comment

Comments

@aymericbouzy
Copy link

I get the following error :

1) schema "before each" hook for "should pass":
I20170831-16:25:22.476(2)?      TypeError: _meteorHwillsonStubCollections2.default.add is not a function
I20170831-16:25:22.477(2)?       at Hook.<anonymous> (server/apollo/stub.test.js:5:21)
I20170831-16:25:22.479(2)?       at run (packages/practicalmeteor:mocha-core/server.js:34:29)
I20170831-16:25:22.486(2)? 
I20170831-16:25:22.486(2)?   2) schema "after each" hook for "should pass":
I20170831-16:25:22.487(2)?      TypeError: _meteorHwillsonStubCollections2.default.restore is not a function
I20170831-16:25:22.499(2)?       at Hook.<anonymous> (server/apollo/stub.test.js:10:21)
I20170831-16:25:22.500(2)?       at run (packages/practicalmeteor:mocha-core/server.js:34:29)

My file :

import StubCollections from "meteor/hwillson:stub-collections"

describe("schema", () => {
  beforeEach(() => {
    StubCollections.add([Contracts])
    StubCollections.stub()
  })

  afterEach(() => {
    StubCollections.restore()
  })

  it("should pass", () => {})
})

Can anyone tell me what I'm doing wrong?

@hwillson
Copy link
Owner

Any chance you could put together a small, runnable reproduction showing this issue? If so I'll take a look. Thanks!

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

No branches or pull requests

2 participants