karma-runner / karma-runner/karma

Downsize 404 web server warns to a debug

Open
#1,611 5 comments 0 reactions 0 assignees View on GitHub
discuss
Dominant language
JavaScript
Stars
12k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

In angular, there is hack for log4js logger - https://github.com/angular/angular.js/blob/8226ff8b8ec262a614ddb7635c33abf8e5624c67/karma-shared.conf.js#L163-165, it was done to hide unwanted 404 responses from the server.

This is pretty common situation and annoying one too.

You recently improved the it by serving favicon, but test generated 404's couldn't be hidden without hacks, or custom log4js appender, which would also be a hack, since that appender, would need to use standart `console` appender, which is a karma dependency, so you would need to actually add your own log4js dependency to do it right.

I'm wondering if there is way to do it properly. One solution would to show those 404 only at debug level. Other is one i can think of, is to provide additional option to the config which would allow to specify array of such exceptions.

Is there any better way?

Contributor guide

Open the contributing guide

Research direction

Start with the linked Angular karma-shared.conf.js example, then inspect Karma's web-server logging and configuration around favicon handling and log4js. Define whether routine test-generated 404 responses should be debug-level or configurable exceptions; done means the selected behavior works without a custom appender or extra logger dependency.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.