Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A couple of tweaks to the karma config #2987

Merged
merged 1 commit into from
Jan 19, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,22 @@ module.exports = function (config) {
files: [
'node_modules/babel-polyfill/browser.js',
testFile,
{pattern: 'vector/img/*', watched: false, included: false, served: true, nocache: false},

// make the images available via our httpd. They will be avaliable
// below http://localhost:[PORT]/base/. See also `proxies` which
// defines alternative URLs for them.
//
// This isn't required by any of the tests, but it stops karma
// logging warnings when it serves a 404 for them.
{
pattern: 'src/skins/vector/img/*',
watched: false, included: false, served: true, nocache: false,
},
],

// redirect img links to the karma server
proxies: {
"/img/": "/base/vector/img/",
// redirect img links to the karma server. See above.
"/img/": "/base/src/skins/vector/img/",
},

// preprocess matching files before serving them to the browser
Expand Down Expand Up @@ -86,6 +96,12 @@ module.exports = function (config) {

webpack: {
module: {
preLoaders: [
// use the source-map-loader for javascript. This means
// that we have a better chance of seeing line numbers from
// the pre-babeled source.
{ test: /\.js$/, loader: "source-map-loader" },
],
loaders: [
{ test: /\.json$/, loader: "json" },
{
Expand Down