Skip to content

Commit

Permalink
Compile all .jsx files before to execute test process
Browse files Browse the repository at this point in the history
Fixes #148
  • Loading branch information
ipeychev committed Mar 24, 2015
1 parent f9e2197 commit e9fa9d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@
"karma-ievms": "0.0.4",
"karma-junit-reporter": "^0.2.2",
"karma-mocha": "^0.1.10",
"karma-react-jsx-preprocessor": "^0.1.1",
"karma-safari-launcher": "^0.1.1",
"karma-sauce-launcher": "^0.2.10",
"karma-sinon": "^1.0.4",
"lodash": "^3.5.0",
"mkdirp": "^0.5.0",
"mocha": "^2.2.1",
"react-tools": "^0.13.1",
"require-dir": "^0.2.0",
"run-sequence": "^1.0.2",
"sinon": "^1.14.1",
Expand Down
11 changes: 6 additions & 5 deletions src/ui/react/karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ var alloyEditorDir = 'dist/alloy-editor-*/alloy-editor/';
var path = require('path');
var srcFiles = require('./_src.js');

var preprocessors = {};
preprocessors[path.join(alloyEditorDir, 'test/*.js')] = ['coverage'];
var preprocessors = {
'**/*.jsx': ['react-jsx']
};

preprocessors[path.join(alloyEditorDir, 'test/**/*.js')] = ['coverage'];

var filesToLoad = [
/* AlloyEditor skins */
Expand Down Expand Up @@ -78,7 +81,7 @@ srcFiles.forEach(function(file) {
});

filesToLoad.push({
pattern: 'src/ui/react/test/*.js',
pattern: 'src/ui/react/test/*.js*',
included: true,
watched: false
});
Expand All @@ -96,11 +99,9 @@ var defaultConfig = {
// list of files / patterns to load in the browser
files: filesToLoad,


// list of files to exclude
exclude: [],


// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: preprocessors,
Expand Down

0 comments on commit e9fa9d0

Please sign in to comment.