module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
frameworks: ['jspm', 'jasmine'],
browserNoActivityTimeout: 20000,
browsers: ['PhantomJS'],
reporters: ['spec', 'coverage'],
singleRun: true,
colors: true,
jspm: {
config: 'src/app/system.config.js',
loadFiles: [
'node_modules/phantomjs-polyfill/bind-polyfill.js',
'test/unit/**/*.js'
],
serveFiles: [
'src/app/**/*.js'
]
},
proxies: {
'/jspm_packages': '/base/jspm_packages'
},
// list of files to exclude
exclude: [],
logLevel: config.LOG_ERROR,
preprocessors: {
'test/unit/**/*.js': ['babel', 'coverage'],
'src/app/**/*.js': ['babel', 'coverage']
},
babelPreprocessor: {
options: {
modules: 'system',
compact: false
}
},
coverageReporter: {
// specify a common output directory
dir: 'coverage/',
reporters: [{
type: 'html',
subdir: 'report-html'
}, {
type: 'lcov',
subdir: 'report-lcov'
}]
}
});
};
The error I get when running karma (local version, from /client) ./node_modules/.bin/karma start karma.config.js is this:
PhantomJS 1.9.8 (Mac OS X 0.0.0) ERROR
TypeError: 'undefined' is not a function (evaluating 'System.register')
at /Users/dave/Sites/kickstart-app/client/src/app/system.config.js:9
PhantomJS 1.9.8 (Mac OS X 0.0.0): Executed 0 of 0 ERROR (0.1 secs / 0 secs)
It seems that System is undefined, which means that it's not loading? Seems to be a path issue, but I surely cannot figure this out for the life of me...
Update: this all works if I downgrade to System 0.16.*
Few facts:
Spent a few hours trying to debug this, and I think my setup is pretty standard. Folder structure here:
Snippet from my
system.config.js
:My karma config:
The error I get when running karma (local version, from /client)
./node_modules/.bin/karma start karma.config.js
is this:It seems that
System
is undefined, which means that it's not loading? Seems to be a path issue, but I surely cannot figure this out for the life of me...