]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remove annoying karma 404 warnings for images
authorVincent Petry <pvince81@owncloud.com>
Fri, 11 Apr 2014 13:25:40 +0000 (15:25 +0200)
committerVincent Petry <pvince81@owncloud.com>
Fri, 11 Apr 2014 13:25:40 +0000 (15:25 +0200)
Karma now serves images from core to avoid polluting the logs with a lot
of 404 warnings.

This also makes it easier to read the test errors during development.

tests/karma.config.js

index ed9836ed4c3bdbd7831342c0f01cca60bacea071..338e3f868e98b744de299b94ddabd1731caa694b 100644 (file)
@@ -121,6 +121,9 @@ module.exports = function(config) {
                files.push('apps/' + appsToTest[i] + '/tests/js/*.js');
        }
 
+       // serve images to avoid warnings
+       files.push({pattern: 'core/img/**/*', watched: false, included: false, served: true});
+
        config.set({
 
                // base path, that will be used to resolve files and exclude
@@ -137,6 +140,11 @@ module.exports = function(config) {
 
                ],
 
+               proxies: {
+                       // prevent warnings for images
+                       '/context.html//core/img/': 'http://localhost:9876/base/core/img/'
+               },
+
                // test results reporter to use
                // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
                reporters: ['dots', 'junit', 'coverage'],