Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

addMarker work fine, but mocha see it as undefined while test #524

Open
moonbrv opened this issue Oct 11, 2016 · 0 comments
Open

addMarker work fine, but mocha see it as undefined while test #524

moonbrv opened this issue Oct 11, 2016 · 0 comments

Comments

@moonbrv
Copy link

moonbrv commented Oct 11, 2016

Hello, i write small piece of code, as in tutorial:

const map = new GMaps({
  el: '#map',
  lat: this.props.lat,
  lng: this.props.lng,
});

map.addMarker({
  lat: this.props.lat,
  lng: this.props.lng,
});

my App works fine, but when i decide to add some Mocha's tests to my components i saw message:

TypeError: map.addMarker is not a function

I'm not understand how it could be.
I write some test:

console.log(typeof GMaps); // function
console.log(typeof GMaps()); // function
console.log(GMaps().toString()); // function () {}

May be it is because i'm in node env. But how can I fix that situation? How to make tests?

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

No branches or pull requests

1 participant