Skip to content
This repository has been archived by the owner on Apr 10, 2018. It is now read-only.

Commit

Permalink
Fix karma.js.conf to use browserify and babelify
Browse files Browse the repository at this point in the history
  • Loading branch information
izumin5210 committed May 26, 2015
1 parent 1def477 commit bb0406f
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = function(config) {

// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],
frameworks: ['browserify', 'jasmine'],


// list of files / patterns to load in the browser
Expand All @@ -33,17 +33,12 @@ module.exports = function(config) {
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'spec/javascripts/**/**_spec.js': ['babel']
'spec/javascripts/**/**_spec.js': ['browserify']
},


babelPreprocessor: {
filename: function (file) {
return file.originalPath.replace(/\.js$/, '.es5.js');
},
sourceFileName: function (file) {
return file.originalPath;
}
browserify: {
transform: ['babelify']
},


Expand Down

0 comments on commit bb0406f

Please sign in to comment.