I am trying to get JSPM / Karma / Babel / Jasmine to work together. But I get an error when starting karma
15 04 2016 17:34:02.428:INFO [karma]: Karma v0.13.22 server started at http://localhost:9876/
15 04 2016 17:34:02.434:INFO [launcher]: Starting browser Chrome
15 04 2016 17:34:03.353:INFO [Chrome 49.0.2623 (Mac OS X 10.11.3)]: Connected on socket /
15 04 2016 17:34:04.212:WARN [web-server]: 404: /base/aurelia-dependency-injection.js
15 04 2016 17:34:04.213:WARN [web-server]: 404: /base/aurelia-router.js
Chrome 49.0.2623 (Mac OS X 10.11.3) ERROR
Error: Error: XHR error (404 Not Found) loading /Users/allen/dev/work/Web/aurelia-dependency-injection.js
Error loading /Users/allen/dev/work/Web/wwwroot/src/app.js
My folder structure:
> Web
karma.conf.js
-> node_modules
-> test
--> unit
-> wwwroot
--> src (all my js)
--> jspm_packages
config.js
My Karam.conf.js:
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jspm', 'jasmine'],
jspm: {
loadFiles: ['test/unit/setup.js', 'test/unit/**/*.js'],
serveFiles: ['wwwroot/src/**/*.js'],
paths: {
'*': '*',
'github:*': 'jspm_packages/github/*',
'npm:*': 'jspm_packages/npm/*',
},
},
files: [],
proxies: {
'/base/jspm_packages/': '/base/wwwroot/jspm_packages/',
},
exclude: [],
preprocessors: {
'test/**/*.js': ['babel'],
'src/**/*.js': ['babel'],
},
babelPreprocessor: {
options: {
sourceMap: 'inline',
presets: ['es2015-loose', 'stage-1'],
plugins: [
'syntax-flow',
'transform-decorators-legacy',
'transform-flow-strip-types',
],
},
},
reporters: ['progress'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
});
};
My app.js has the following imports:
import { inject } from 'aurelia-dependency-injection';
import { Router } from 'aurelia-router';
import { Navscroll } from '../src/modules/scroll-anim.js'
I am not sure if my proxy is configured correctly or not or what is the problem?