Closed sardormajano closed 4 years ago
Hi, @sardormajano
Thanks for reporting this issue. I'm unfortunately unable to reproduce the issue, as I don't have a proxy setup like you do. You can however pass along options to jsdom
, as shown here. Perhaps a custom ResourceLoader can solve your issue?
@badeball thanks for your response.
I didn't know I could pass a custom JSDOM instance in karma.conf
like that. Very helpful.
Closing the issue.
Steps to reproduce:
Using @angular/cli 10.x create a new project,
ng new karma-jsdom-issue-repro
cd karma-jsdom-issue-repro && npm i -D karma-jsdom-launcher jsdom
setup
karma.conf
to use jsdom as browser, includekarma-jsdom-launcher
in plugins. It should eventually look as follows:npm run test
Runs perfectly fine when not behind proxy (on my home laptop), but giving error on my office machine (behind corporate proxy): "ERROR [karma-server]: UnhandledRejection: 407"
I did not have any issues using
JSDOM
16.2.2
andkarma-jsdom-launcher
7.1.1
on Angular 7 and 8. I recently had to create a new project using Angular 10 and got this error.My package.json:
Since I don't directly create JSDOM instance, I have no idea how to set proxy configs.
Is there any solution to this issue?
Thanks in advance.