blob: a5ea0848c398ac6a91652bc02b47d621dbe98d60 [file] [log] [blame]
Matteo Scandolofc4b37b2017-02-02 12:18:47 -08001const conf = require('./gulp.conf');
2const pkg = require('../package.json');
3
4module.exports = function (config) {
5 const configuration = {
6 basePath: '../',
7 singleRun: false,
8 autoWatch: true,
9 logLevel: 'INFO',
10 junitReporter: {
11 outputDir: 'test-reports'
12 },
13 browsers: [
14 'PhantomJS',
15 // 'Chrome'
16 ],
17 frameworks: [
18 'jasmine',
19 'es6-shim'
20 ],
21 files: [
22 'node_modules/es6-shim/es6-shim.js',
23 conf.path.src('index.spec.js'),
24 conf.path.src('**/*.html')
25 ],
26 preprocessors: {
27 [conf.path.src('index.spec.js')]: [
28 'webpack'
29 ],
30 [conf.path.src('**/*.html')]: [
31 'ng-html2js'
32 ]
33 },
34 ngHtml2JsPreprocessor: {
35 stripPrefix: `${conf.paths.src}/`
36 },
37 reporters: ['mocha', 'coverage'],
38 coverageReporter: {
39 type: 'html',
40 dir: 'coverage/'
41 },
42 webpack: require('./webpack-test.conf'),
43 webpackMiddleware: {
44 noInfo: true
45 },
46 plugins: [
47 require('karma-jasmine'),
48 require('karma-junit-reporter'),
49 require('karma-coverage'),
50 require('karma-phantomjs-launcher'),
51 require('karma-chrome-launcher'),
52 require('karma-phantomjs-shim'),
53 require('karma-ng-html2js-preprocessor'),
54 require('karma-webpack'),
55 require('karma-es6-shim'),
56 require('karma-mocha-reporter')
57 ]
58 };
59
60 config.set(configuration);
61};