I'm using jspm to load angular, when I run karma, I have Can't find variable: angular. This error is generated by the file generated by ng-html2js.
Here is my karma.conf :
module.exports = function (config) {
const configuration = {
browsers: [
'PhantomJS'
],
basePath: '../',
singleRun: true,
autoWatch: false,
logLevel: 'INFO',
junitReporter: {
outputDir: 'test-reports'
},
frameworks: [
'phantomjs-shim',
'jspm',
'jasmine'
],
preprocessors: {
[conf.path.src('**/*.html')]: [
'ng-html2js'
]
},
ngHtml2JsPreprocessor: {},
jspm: {
config: 'jspm.config.js',
loadFiles: [
conf.path.src('app/**/*.js'),
conf.path.src('**/*.html')
]
},
plugins: [
require('karma-jasmine'),
require('karma-junit-reporter'),
require('karma-phantomjs-launcher'),
require('karma-phantomjs-shim'),
require('karma-coverage'),
require('karma-ng-html2js-preprocessor'),
require('karma-jspm')
]
};
config.set(configuration);
};
I tried to add angular to the paths lists and also to the files list but none worked.
I'm using jspm to load angular, when I run karma, I have
Can't find variable: angular. This error is generated by the file generated byng-html2js.Here is my karma.conf :
I tried to add
angularto the paths lists and also to the files list but none worked.