Skip to content

Instantly share code, notes, and snippets.

@capaj
Created February 3, 2015 10:31
Show Gist options
  • Save capaj/8db4533c3a1cab1bf930 to your computer and use it in GitHub Desktop.
Save capaj/8db4533c3a1cab1bf930 to your computer and use it in GitHub Desktop.
showcasing my karma-jspm conf
module.exports = function(config) {
var browser = 'PhantomJS';
if (process.env.NODE_ENV === 'development') {
browser = 'Chrome'; //chrome is much better, because it shows properly line numbers
}
config.set({
// base path, that will be used to resolve files and exclude
basePath: '../',
// testing framework to use (jasmine/mocha/qunit/...)
frameworks: ['jspm', 'mocha', 'chai'],
// list of files / patterns to load in the browser
files: [],
jspm: {
useBundles: true,
loadFiles: [
'public/jspm_packages/github/angular/bower-angular-mocks@1.3.11/angular-mocks.js',
'test/unit/**/*.js'
],
serveFiles: ['public/**']
},
// list of files / patterns to exclude
exclude: [],
proxies: {
'/base/': 'http://localhost:8283/'
},
// web server port
port: 8067,
// level of logging
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
logLevel: config.LOG_INFO,
preprocessors: {},
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers: [browser] //use Chrome for development
// browsers: ['Chrome','Safari','Firefox','Opera','ChromeCanary'],
});
};
@cengageLucas
Copy link

Do you know if the exclude array will work in this case? I'm following a similar example but I can't get a file added there to be dropped from the served list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment