-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
There should be a way to ask karma to serve a specific directory in a given path #872
Comments
@glepretre Even when having a second web server would somehow fix this, I was thinking that being able to do proxies = {
'/images': 'file:///somepath/'
}; would be simple enough to solve the issue here. I view this issue as unrelated to #893 #864 maybe I am not being able to see the connection |
I tried to do :
but I got :
I think it depends on the tests but mine pass anyway with this error |
@glepretre I think I like your suggestion the best, this should work: proxies: {
'/img/': '/base/app/img/'
}, We just need to fix https://github.com/karma-runner/karma/blob/master/lib/middleware/proxy.js#L37-L42 - if no host/port is defined, use the Karma ones (proxy to Karma itself). |
I have tried above fix for karma-warnings. But it was not fixed for me. Could you any one provide me an right solution to the clear the WARN web- server in karma |
I've also encountered this issue, |
None of those answers solved this annoying 404 warn. I've this setup in my karma.conf.js:
with proxies setup I got this warn:
without proxies setup I got this warn:
|
In case someone still has this problem, here is my fix Folders:
// karma.conf.js
config.set({
basePath: '',
...
files: [
{ pattern: 'src/assets/*.jpg', included: false, served: true }
]
... request in the test
|
There should be a way to specify karma that a specific content should be served from a specified path. Right now, the only (very hacky) way to do this is
That has the big issue that, when the configuration is run, we cannot be positive that karma will run at port 9876 or another port
The text was updated successfully, but these errors were encountered: