2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6 * Copyright © 2017 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 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
24 var path = require('path');
25 var webpack = require('webpack');
26 var isparta = require('isparta');
28 module.exports = function (config) {
31 browsers: [process.env.CONTINUOUS_INTEGRATION ? 'Firefox' : 'Chrome'],
35 frameworks: ['mocha'],
37 files: ['tests.webpack.js'],
40 'tests.webpack.js': ['webpack', 'sourcemap'],
41 'src/**/*.jsx': ['coverage']
44 reporters: ['progress', 'coverage'],
47 dir: 'dist/coverage/',
50 {type: 'text-summary'}
52 includeAllSources: true,
53 instrumenters: {isparta: isparta},
58 instrumenterOptions: {
68 presets: ['es2015', 'stage-0', 'react']
73 // these babel options will be passed only to isparta and not to babel-loader
75 presets: ['es2015', 'stage-0', 'react']
78 devtool: 'inline-source-map',
80 root: [path.resolve('.')],
83 'generic-components': 'src/generic-components',
85 'test-utils': 'test/utils'
90 {test: /\.(js|jsx)$/, exclude: /node_modules/, loader: 'babel-loader'},
91 {test: /\.(js|jsx)$/, exclude: /(test|test\.js|node_modules)/, loader: 'isparta'}
94 {test: /\.css$/, loaders: ['style', 'css', 'resolve-url']},
95 {test: /\.scss$/, loaders: ['style', 'css', 'resolve-url', 'sass?sourceMap']},
96 // required for font icons
97 {test: /\.(woff|woff2)(\?.*)?$/, loader: 'url-loader?limit=16384&mimetype=application/font-woff'},
98 {test: /\.(ttf|eot|otf)(\?.*)?$/, loader: 'file-loader'},
99 {test: /\.(png|jpg|svg)(\?.*)?$/, loader: 'url-loader?limit=16384'},
101 {test: /\.json$/, loaders: ['json']}