-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
6 changed files
with
322 additions
and
244 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,145 +1,152 @@ | ||
// Karma configuration | ||
// Generated on Mon Oct 29 2018 14:12:47 GMT-0400 (Eastern Daylight Time) | ||
|
||
const path = require( 'path' ); | ||
const Merge = require( 'webpack-merge' ); | ||
const baseConfig = require( './webpack-config/webpack.base.config' ); | ||
const path = require("path"); | ||
const Merge = require("webpack-merge"); | ||
const baseConfig = require("./webpack-config/webpack.base.config"); | ||
|
||
const materialIconFiles = [ | ||
{ pattern: 'node_modules/material-design-icons/iconfont/material-icons.css', included: true }, | ||
{ pattern: 'node_modules/material-design-icons/iconfont/MaterialIcons-Regular.eot', included: false }, | ||
{ pattern: 'node_modules/material-design-icons/iconfont/MaterialIcons-Regular.svg', included: false }, | ||
{ pattern: 'node_modules/material-design-icons/iconfont/MaterialIcons-Regular.ttf', included: false }, | ||
{ pattern: 'node_modules/material-design-icons/iconfont/MaterialIcons-Regular.woff', included: false }, | ||
{ pattern: 'node_modules/material-design-icons/iconfont/MaterialIcons-Regular.woff2', included: false }, | ||
{ | ||
pattern: "node_modules/material-design-icons/iconfont/material-icons.css", | ||
included: true | ||
}, | ||
{ | ||
pattern: | ||
"node_modules/material-design-icons/iconfont/MaterialIcons-Regular.eot", | ||
included: false | ||
}, | ||
{ | ||
pattern: | ||
"node_modules/material-design-icons/iconfont/MaterialIcons-Regular.svg", | ||
included: false | ||
}, | ||
{ | ||
pattern: | ||
"node_modules/material-design-icons/iconfont/MaterialIcons-Regular.ttf", | ||
included: false | ||
}, | ||
{ | ||
pattern: | ||
"node_modules/material-design-icons/iconfont/MaterialIcons-Regular.woff", | ||
included: false | ||
}, | ||
{ | ||
pattern: | ||
"node_modules/material-design-icons/iconfont/MaterialIcons-Regular.woff2", | ||
included: false | ||
} | ||
]; | ||
|
||
const webpackConfig = Merge( baseConfig, { | ||
mode: 'development', | ||
entry: './test/hoot/index.js', | ||
module: { | ||
rules: [ | ||
// instrument only testing sources with Istanbul | ||
{ | ||
test: /\.js$/, | ||
use: { | ||
loader: 'istanbul-instrumenter-loader', | ||
options: { esModules: true } | ||
}, | ||
include: path.resolve( __dirname, 'modules/Hoot/' ), | ||
enforce: 'post' | ||
// exclude: /node_modules|\.spec\.js$/ | ||
} | ||
] | ||
}, | ||
resolve: { | ||
alias: { | ||
img: path.resolve( __dirname, 'img' ), | ||
lib: path.resolve( __dirname, 'modules/lib' ) | ||
} | ||
}, | ||
} ); | ||
|
||
module.exports = function( config ) { | ||
config.set( { | ||
|
||
// base path that will be used to resolve all patterns (eg. files, exclude) | ||
basePath: '', | ||
|
||
|
||
// frameworks to use | ||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter | ||
frameworks: [ 'mocha' ], | ||
|
||
|
||
client: { | ||
mocha: { | ||
timeout: 5000 | ||
} | ||
const webpackConfig = Merge(baseConfig, { | ||
mode: "development", | ||
entry: "./test/hoot/index.js", | ||
module: { | ||
rules: [ | ||
// instrument only testing sources with Istanbul | ||
{ | ||
test: /\.js$/, | ||
use: { | ||
loader: "istanbul-instrumenter-loader", | ||
options: { esModules: true } | ||
}, | ||
include: path.resolve(__dirname, "modules/Hoot/"), | ||
enforce: "post" | ||
// exclude: /node_modules|\.spec\.js$/ | ||
} | ||
] | ||
}, | ||
resolve: { | ||
alias: { | ||
img: path.resolve(__dirname, "img"), | ||
lib: path.resolve(__dirname, "modules/lib") | ||
} | ||
} | ||
}); | ||
|
||
module.exports = function(config) { | ||
config.set({ | ||
// base path that will be used to resolve all patterns (eg. files, exclude) | ||
basePath: "", | ||
|
||
// frameworks to use | ||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter | ||
frameworks: ["mocha"], | ||
|
||
client: { | ||
mocha: { | ||
timeout: 5000 | ||
} | ||
}, | ||
|
||
// list of files / patterns to load in the browser | ||
files: [ | ||
...materialIconFiles, | ||
|
||
{ pattern: "img/**/*.svg", included: false }, | ||
{ pattern: "img/**/*.png", included: false }, | ||
{ pattern: "img/**/*.gif", included: false }, | ||
|
||
{ pattern: "test/data/UndividedHighway.osm", included: false }, | ||
{ pattern: "test/data/ImportMultiTest.dbf", included: false }, | ||
{ pattern: "test/data/ImportMultiTest.shp", included: false }, | ||
{ pattern: "test/data/ImportMultiTest.shx", included: false }, | ||
|
||
"css/**/*.css", | ||
"css/**/*.scss", | ||
"test/hoot/index.js" | ||
], | ||
|
||
// list of files / patterns to exclude | ||
exclude: [], | ||
|
||
// preprocess matching files before serving them to the browser | ||
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor | ||
preprocessors: { | ||
"test/hoot/index.js": ["webpack"], | ||
"test/hoot/helpers.js": ["webpack"], | ||
"css/**/*.scss": ["scss"] | ||
}, | ||
|
||
// list of files / patterns to load in the browser | ||
files: [ | ||
...materialIconFiles, | ||
|
||
{ pattern: 'img/**/*.svg', included: false }, | ||
{ pattern: 'img/**/*.png', included: false }, | ||
{ pattern: 'img/**/*.gif', included: false }, | ||
|
||
{ pattern: 'test/data/UndividedHighway.osm', included: false }, | ||
{ pattern: 'test/data/ImportMultiTest.dbf', included: false }, | ||
{ pattern: 'test/data/ImportMultiTest.shp', included: false }, | ||
{ pattern: 'test/data/ImportMultiTest.shx', included: false }, | ||
|
||
'css/**/*.css', | ||
'css/**/*.scss', | ||
'test/hoot/index.js' | ||
], | ||
|
||
|
||
// list of files / patterns to exclude | ||
exclude: [], | ||
|
||
|
||
// preprocess matching files before serving them to the browser | ||
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor | ||
preprocessors: { | ||
'test/hoot/index.js': [ 'webpack' ], | ||
'test/hoot/helpers.js': [ 'webpack' ], | ||
'css/**/*.scss': [ 'scss' ] | ||
}, | ||
|
||
|
||
proxies: { | ||
'/img/': '/base/img/' | ||
}, | ||
|
||
|
||
webpack: webpackConfig, | ||
|
||
|
||
// test results reporter to use | ||
// possible values: 'dots', 'progress' | ||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter | ||
reporters: [ 'spec', 'coverage-istanbul' ], | ||
|
||
|
||
coverageIstanbulReporter: { | ||
reports: [ 'html', 'lcov', 'text-summary' ], | ||
dir: path.join( __dirname, 'coverage' ), | ||
fixWebpackSourcePaths: true | ||
}, | ||
|
||
|
||
// web server port | ||
port: 9876, | ||
|
||
proxies: { | ||
"/img/": "/base/img/" | ||
}, | ||
|
||
// enable / disable colors in the output (reporters and logs) | ||
colors: true, | ||
webpack: webpackConfig, | ||
|
||
// test results reporter to use | ||
// possible values: 'dots', 'progress' | ||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter | ||
reporters: ["spec", "coverage-istanbul"], | ||
|
||
// level of logging | ||
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG | ||
logLevel: config.LOG_INFO, | ||
coverageIstanbulReporter: { | ||
reports: ["html", "lcov", "text-summary"], | ||
dir: path.join(__dirname, "coverage"), | ||
fixWebpackSourcePaths: true | ||
}, | ||
|
||
// web server port | ||
port: 9876, | ||
|
||
// enable / disable watching file and executing tests whenever any file changes | ||
autoWatch: false, | ||
// enable / disable colors in the output (reporters and logs) | ||
colors: true, | ||
|
||
// level of logging | ||
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG | ||
logLevel: config.LOG_INFO, | ||
|
||
// start these browsers | ||
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher | ||
browsers: [ 'Chrome' ], | ||
// enable / disable watching file and executing tests whenever any file changes | ||
autoWatch: true, | ||
|
||
// start these browsers | ||
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher | ||
browsers: ["Chrome"], | ||
|
||
// Continuous Integration mode | ||
// if true, Karma captures browsers, runs the tests and exits | ||
singleRun: false, | ||
// Continuous Integration mode | ||
// if true, Karma captures browsers, runs the tests and exits | ||
singleRun: false, | ||
|
||
// Concurrency level | ||
// how many browser should be started simultaneous | ||
concurrency: 1 | ||
} ); | ||
// Concurrency level | ||
// how many browser should be started simultaneous | ||
concurrency: 1 | ||
}); | ||
}; |
Oops, something went wrong.