Skip to content

Commit 92096c4

Browse files
authored
Merge pull request element-hq#2987 from vector-im/rav/karma_tweaks
A couple of tweaks to the karma config
2 parents 6c4bf58 + 237f4df commit 92096c4

1 file changed

Lines changed: 19 additions & 3 deletions

File tree

‎karma.conf.js‎

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,22 @@ module.exports = function (config) {
2929
files: [
3030
'node_modules/babel-polyfill/browser.js',
3131
testFile,
32-
{pattern: 'vector/img/*', watched: false, included: false, served: true, nocache: false},
32+
33+
// make the images available via our httpd. They will be avaliable
34+
// below http://localhost:[PORT]/base/. See also `proxies` which
35+
// defines alternative URLs for them.
36+
//
37+
// This isn't required by any of the tests, but it stops karma
38+
// logging warnings when it serves a 404 for them.
39+
{
40+
pattern: 'src/skins/vector/img/*',
41+
watched: false, included: false, served: true, nocache: false,
42+
},
3343
],
3444

35-
// redirect img links to the karma server
3645
proxies: {
37-
"/img/": "/base/vector/img/",
46+
// redirect img links to the karma server. See above.
47+
"/img/": "/base/src/skins/vector/img/",
3848
},
3949

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

8797
webpack: {
8898
module: {
99+
preLoaders: [
100+
// use the source-map-loader for javascript. This means
101+
// that we have a better chance of seeing line numbers from
102+
// the pre-babeled source.
103+
{ test: /\.js$/, loader: "source-map-loader" },
104+
],
89105
loaders: [
90106
{ test: /\.json$/, loader: "json" },
91107
{

0 commit comments

Comments
 (0)