Skip to content

Module is not created for external templates #87

@perezperret

Description

@perezperret

I am using JSPM, so my config is a bit different from the usual examples. In my karma.config.j file I am loading the templates the following way:

...    
    jspm: {
        loadFiles: [
            'spec/**/*.spec.js',
            'dist/app.js',
        ],
        serveFiles: [
            'dist/**/*.html',
            'dist/**/*.js',
            'dist/**/*.js.map',
        ],
    },
...

And configuring the plugin this way:

...   
    preprocessors: {
        'dist/**/*.html': ['ng-html2js']
    },

    ngHtml2JsPreprocessor: {
        moduleName: 'templates'
    },
...

When I run karma with debug-level logging I can see the correct templates being processed, but I can't mock them in the tests using the module name (angular.mock.module('templates')) nor in the debugger.

For reference I am running OS X 10.10.5, Chrome 48.0.2564.97 (64-bit) and Firefox 30.0.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions