summaryrefslogtreecommitdiff
path: root/config/karma.config.js
diff options
context:
space:
mode:
authorLuke "Jared" Bennett <lbennett@gitlab.com>2016-12-29 15:42:48 -0600
committerMike Greiling <mike@pixelcog.com>2017-01-10 12:30:40 -0600
commit7c47cc94c5d7425583db3610c85cb150df601a91 (patch)
tree2544c6ac133e4abba79dcacb2a10df24e79224d6 /config/karma.config.js
parent3eb8569778ce2559eedab706f6f901238e39b355 (diff)
downloadgitlab-ce-7c47cc94c5d7425583db3610c85cb150df601a91.tar.gz
Swapped out teaspoon for karma
Diffstat (limited to 'config/karma.config.js')
-rw-r--r--config/karma.config.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/config/karma.config.js b/config/karma.config.js
new file mode 100644
index 00000000000..478ef082547
--- /dev/null
+++ b/config/karma.config.js
@@ -0,0 +1,27 @@
+var path = require('path');
+var webpackConfig = require('./webpack.config.js');
+var ROOT_PATH = path.resolve(__dirname, '..');
+
+// Karma configuration
+module.exports = function(config) {
+ config.set({
+ basePath: ROOT_PATH,
+ frameworks: ['jquery-2.1.0', 'jasmine'],
+ files: [
+ 'spec/javascripts/*_spec.js',
+ 'spec/javascripts/*_spec.js.es6',
+ { pattern: 'spec/javascripts/fixtures/**/*.html', included: false, served: true },
+ { pattern: 'spec/javascripts/fixtures/**/*.json', included: false, served: true },
+ ],
+ preprocessors: {
+ 'spec/javascripts/*_spec.js': ['webpack'],
+ 'spec/javascripts/*_spec.js.es6': ['webpack'],
+ 'app/assets/javascripts/**/*.js': ['webpack'],
+ 'app/assets/javascripts/**/*.js.es6': ['webpack'],
+ },
+
+ webpack: webpackConfig,
+
+ webpackMiddleware: { stats: 'errors-only' },
+ });
+};