You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The application works fine. The problem is only in tests. I searched in internet and what i found is that in tests many things are missing like window and there is no WebGLRenderingContext object. Maybe there is a way to mock this, but i could not find it.
Version info
Version of ngx-extended-pdf-viewer: 23.0.0
The text was updated successfully, but these errors were encountered:
I notice the same problem when trying to write a Jest test. However, your analysis allows me to solve it. Can you send me a simple smoke that that used to work in version 22, please? When trying to write a Jest test I had to mock so many things that I gave up after a while.
I've added a test runner detection to the offending code. I hope it works with less mocking now.
I'd still appreciate it if you could send me a working Jest smoke test. When I tried to write a Jest test myself, I ended up with a lot of frustration...
When running jest tests after upgrading to ngx-extended-pdf-viewer v. 23.0.0 (in v. 22.0.0 everything works) i get:
ReferenceError: WebGLRenderingContext is not defined
The error is here:

You added the code because of: #2568
The application works fine. The problem is only in tests. I searched in internet and what i found is that in tests many things are missing like window and there is no WebGLRenderingContext object. Maybe there is a way to mock this, but i could not find it.
Version info
The text was updated successfully, but these errors were encountered: