I'm currently trying to set up a demo project using Node / AngularJs / JSPM with the ES6 Babel and Karma transporter.
The working part is working. I need to improve it later, but the first "world hello" from angular works.
I want to add Karma to run unit tests for an angular application. But I get a 404 warning for jspm_packagessee screenshot below.
My test does not work because it will always fail. My test file looks like this (without angular).
import 'angular-mocks';
describe('Test suite for HomeController', function() {
it('dummy test', function() {
expect(true).toBe(true);
});
});
Not sure what happened, and I tried a lot of things without success, maybe I did something wrong. But here is what I tried in Karma configuration:
- Tried a lot of different path settings, because I think this is a path problem
- Used proxies
- Browserify Bablify
- JSPM
, , bitbucket.
:

:

Karma:
module.exports = function(config) {
config.set({
basePath: '.',
frameworks: ['jspm', 'jasmine'],
files: [
],
jspm: {
paths: {
},
loadFiles: ['client/test-unit/**/*.spec.js'],
serveFiles: ['client/app/**/*.js', 'client/app/**/*.css', 'client/app/**/*.html']
},
proxies: {
},
plugins:[
'karma-jasmine',
'karma-coverage',
'karma-jspm',
'karma-chrome-launcher'
],
exclude: [
],
preprocessors: {
},
reporters: ['progress'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};