12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- var merge = require('webpack-merge')
- var HtmlWebpackPlugin = require('html-webpack-plugin')
- var baseConfig = require('../../build/webpack.base.conf')
- var utils = require('../../build/utils')
- var webpack = require('webpack')
- var webpackConfig = merge(baseConfig, {
-
- module: {
- rules: utils.styleLoaders()
- },
- devtool: '#inline-source-map',
-
-
-
-
-
- plugins: [
- new webpack.DefinePlugin({
- 'process.env': require('../../config/test.env')
- }),
- new HtmlWebpackPlugin({
- filename: 'index.html',
- template: 'index.html',
- inject: true
- })
- ]
- })
- delete webpackConfig.entry
- module.exports = function (config) {
- config.set({
-
-
-
-
- browsers: ['FirefoxHeadless'],
- frameworks: ['mocha', 'sinon-chai'],
- reporters: ['mocha'],
- customLaunchers: {
- 'FirefoxHeadless': {
- base: 'Firefox',
- flags: [
- '-headless'
- ]
- }
- },
- files: [
- './index.js'
- ],
- preprocessors: {
- './index.js': ['webpack', 'sourcemap']
- },
- webpack: webpackConfig,
- webpackMiddleware: {
- noInfo: true
- },
- mochaReporter: {
- showDiff: true
- },
- coverageReporter: {
- dir: './coverage',
- reporters: [
- { type: 'lcov', subdir: '.' },
- { type: 'text-summary' }
- ]
- }
- })
- }
|