Skip to content
This repository was archived by the owner on Nov 30, 2018. It is now read-only.
This repository was archived by the owner on Nov 30, 2018. It is now read-only.

[question] Testing angular-google-maps apps: mocking the module google-maps #270

@LeandroLovisolo

Description

@LeandroLovisolo

Hi all,

I'm trying to test a single-module application which lists google-maps as one of its dependencies. I'm using the Karma test runner. All the required dependencies are included in my karma.conf.js file.

Right now I'm getting the following error message:

Uncaught ReferenceError: google is not defined
    at /home/leandro/myproject/app/bower_components/angular-google-maps/dist/angular-google-maps.js:5089

I'm guessing this is because the google maps API code isn't being loaded in the browser.

So my question is: what is the recommended way to test a module that depends on google-maps? Should I mock the module google-maps or is there a simpler way to do this?

I'm using angular-google-maps 1.0.9.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions