2 * ============LICENSE_START===================================================
3 * SPARKY (AAI UI service)
4 * ============================================================================
5 * Copyright © 2017 AT&T Intellectual Property.
6 * Copyright © 2017 Amdocs
8 * ============================================================================
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 * ============LICENSE_END=====================================================
22 * ECOMP and OpenECOMP are trademarks
23 * and service marks of AT&T Intellectual Property.
26 var path = require('path');
27 var webpack = require('webpack');
28 var isparta = require('isparta');
30 module.exports = function (config) {
33 browsers: [process.env.CONTINUOUS_INTEGRATION ? 'Firefox' : 'Chrome'],
37 frameworks: ['mocha'],
39 files: ['tests.webpack.js'],
42 'tests.webpack.js': ['webpack', 'sourcemap'],
43 'src/**/*.jsx': ['coverage']
46 reporters: ['progress', 'coverage'],
49 dir: 'dist/coverage/',
52 {type: 'text-summary'}
54 includeAllSources: true,
55 instrumenters: {isparta: isparta},
60 instrumenterOptions: {
70 presets: ['es2015', 'stage-0', 'react']
75 // these babel options will be passed only to isparta and not to babel-loader
77 presets: ['es2015', 'stage-0', 'react']
80 devtool: 'inline-source-map',
82 root: [path.resolve('.')],
85 'generic-components': 'src/generic-components',
87 'test-utils': 'test/utils'
92 {test: /\.(js|jsx)$/, exclude: /node_modules/, loader: 'babel-loader'},
93 {test: /\.(js|jsx)$/, exclude: /(test|test\.js|node_modules)/, loader: 'isparta'}
96 {test: /\.css$/, loaders: ['style', 'css', 'resolve-url']},
97 {test: /\.scss$/, loaders: ['style', 'css', 'resolve-url', 'sass?sourceMap']},
98 // required for font icons
99 {test: /\.(woff|woff2)(\?.*)?$/, loader: 'url-loader?limit=16384&mimetype=application/font-woff'},
100 {test: /\.(ttf|eot|otf)(\?.*)?$/, loader: 'file-loader'},
101 {test: /\.(png|jpg|svg)(\?.*)?$/, loader: 'url-loader?limit=16384'},
103 {test: /\.json$/, loaders: ['json']}