Skip to content

Instantly share code, notes, and snippets.

@mFingers
Created February 4, 2016 13:24
Show Gist options
  • Save mFingers/4f7ad679dda584a8963f to your computer and use it in GitHub Desktop.
Save mFingers/4f7ad679dda584a8963f to your computer and use it in GitHub Desktop.
karma / jasmine / ES6
module.exports = function (config) {
config.set({
frameworks: ['jspm', 'jasmine-ajax', 'jasmine'],
reporters: ['spec'],
files: [
'node_modules/babel-polyfill/dist/polyfill.js'
],
jspm: {
config: 'Scripts/config.js',
loadFiles: [
'Scripts/spec/**/*.js'
],
serveFiles: [
'Scripts/src/**/*.js'
]
},
proxies: {
'/Scripts/': '/base/Scripts',
'/src/': '/Scripts/src',
'/jspm_packages/': '/Scripts/jspm_packages'
},
browsers: ['PhantomJS'],
preprocessors: {
'Scripts/spec/**/*.js': ['babel'],
'Scripts/src/**/*.js': ['babel']
},
babelPreprocessor: {
options: {
presets: ['es2015'],
sourceMap: 'inline'
},
sourceFileName: function (file) {
return file.originalPath;
}
}
});
};
{
"jspm": {
"directories": {
"baseURL": "Scripts"
},
"dependencies": {
"bootstrap": "github:twbs/bootstrap@^3.3.5",
"jquery": "github:components/jquery@^2.1.4",
"knockout": "github:knockout/knockout@^3.3.0",
"knockout-validation": "github:Knockout-Contrib/Knockout-Validation@^2.0.3",
"underscore": "npm:underscore@^1.8.3"
},
"devDependencies": {
"babel": "npm:babel-core@^6.4.5",
"babel-runtime": "npm:babel-runtime@^5.8.24",
"core-js": "npm:core-js@^1.1.4"
}
},
"devDependencies": {
"babel-core": "^6.4.5",
"babel-polyfill": "^6.3.14",
"babel-preset-es2015": "^6.3.13",
"del": "^2.0.2",
"gulp": "^3.9.0",
"gulp-sass": "^2.0.4",
"jasmine-core": "^2.4.1",
"jspm": "^0.16.9",
"karma": "^0.13.19",
"karma-babel-preprocessor": "^6.0.1",
"karma-jasmine": "^0.3.6",
"karma-jasmine-ajax": "^0.1.13",
"karma-jspm": "^2.0.2",
"karma-phantomjs-launcher": "^1.0.0",
"karma-spec-reporter": "0.0.23",
"phantomjs": "^2.1.3",
"phantomjs-prebuilt": "^2.1.3",
"systemjs-builder": "^0.14.7"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment