-
Notifications
You must be signed in to change notification settings - Fork 309
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
[Bug]: Angular Material tests using Harness fail with Expected to be running in 'ProxyZone', but it was not found. #1058
Comments
Hi, the issue is caused by zone patch for jest. You can use workaround https://stackoverflow.com/questions/63235895/angular-material-jasmine-testing-errors-while-loading-material-harnesses (I use Option 1 which replaces @JiaLiPassion would you please take a look at this? I think this is something should be fixed from |
@ahnpnl , sure, I will check it. |
The issue is described here angular/components#21632, so the walkaround will be update the |
thanks a lot! Indeed if I switch |
sure, using |
Version
10.0.1
Steps to reproduce
Hi,
I'm facing an issue using Angular Material harnesses for testing components. I started from scratch a new project following carefully the installation instruction but this error stil happens:
Expected to be running in 'ProxyZone', but it was not found.
Clone repo https://git.sr.ht/~npen/jest-angular-material-harness
run npm i
npm test (using Karma works ok)
npm run test-jest gives the following error
Expected to be running in 'ProxyZone', but it was not found.
This is the test failing: https://git.sr.ht/~npen/jest-angular-material-harness/tree/main/item/src/app/button-page/button-page.component.spec.ts
It's a very basic test using Angular Material Harnesses
Expected behavior
The test should be working
Actual behavior
The test fails with the error
Expected to be running in 'ProxyZone', but it was not found.
Additional context
No response
Environment
System: OS: Linux 5.10 Debian GNU/Linux 11 (bullseye) 11 (bullseye) CPU: (8) x64 Intel(R) Core(TM) i5-8365U CPU @ 1.60GHz Binaries: Node: 14.18.0 - /usr/bin/node npm: 6.14.15 - /usr/bin/npm npmPackages: jest: ^27.2.4 => 27.2.4
The text was updated successfully, but these errors were encountered: