Skip to content

Instantly share code, notes, and snippets.

@rolaveric
Created January 21, 2015 10:07
Show Gist options
  • Save rolaveric/531c8b993f625a1f690e to your computer and use it in GitHub Desktop.
Save rolaveric/531c8b993f625a1f690e to your computer and use it in GitHub Desktop.
Snippet of a Karma configuration using karma-systemjs
// Add 'karma-systemjs' to the list of plugins
plugins: ['karma-systemjs', ...],
// Add 'systemjs' to the list of frameworks
frameworks: ['systemjs', 'jasmine'],
// Move all the `files` to `systemjs.files`
files: [],
systemjs: {
files: [
'app/bower_components/angular/angular.js',
'app/bower_components/angular-route/angular-route.js',
'app/bower_components/angular-mocks/angular-mocks.js',
'app/*/**/*.js'
],
// Point out where the SystemJS config file is
configFile: 'app/system.config.js',
// Add any additional configuration, such as mappings to modules only used in testing
config: {
paths: {
'angular-mocks': 'bower_components/angular-mocks/angular-mocks.js'
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment