2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
6 * Copyright © 2017-2018 Amdocs
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END=========================================================
21 var path = require('path');
22 var webpack = require('webpack');
23 var isparta = require('isparta');
25 module.exports = function (config) {
28 browsers: [process.env.CONTINUOUS_INTEGRATION ? 'Firefox' : 'Chrome'],
32 frameworks: ['mocha'],
34 files: ['tests.webpack.js'],
37 'tests.webpack.js': ['webpack', 'sourcemap'],
38 'src/**/*.jsx': ['coverage']
41 reporters: ['progress', 'coverage'],
44 dir: 'dist/coverage/',
47 {type: 'text-summary'}
49 includeAllSources: true,
50 instrumenters: {isparta: isparta},
55 instrumenterOptions: {
65 presets: ['es2015', 'stage-0', 'react']
70 // these babel options will be passed only to isparta and not to babel-loader
72 presets: ['es2015', 'stage-0', 'react']
75 devtool: 'inline-source-map',
77 root: [path.resolve('.')],
80 'generic-components': 'src/generic-components',
82 'test-utils': 'test/utils'
87 {test: /\.(js|jsx)$/, exclude: /node_modules/, loader: 'babel-loader'},
88 {test: /\.(js|jsx)$/, exclude: /(test|test\.js|node_modules)/, loader: 'isparta'}
91 {test: /\.css$/, loaders: ['style', 'css', 'resolve-url']},
92 {test: /\.scss$/, loaders: ['style', 'css', 'resolve-url', 'sass?sourceMap']},
93 // required for font icons
94 {test: /\.(woff|woff2)(\?.*)?$/, loader: 'url-loader?limit=16384&mimetype=application/font-woff'},
95 {test: /\.(ttf|eot|otf)(\?.*)?$/, loader: 'file-loader'},
96 {test: /\.(png|jpg|svg)(\?.*)?$/, loader: 'url-loader?limit=16384'},
98 {test: /\.json$/, loaders: ['json']}