Replies: 6 comments 11 replies
-
My intention here was to test @xeokit/viewer with the WebGL-based rendering strategy in @xeokit/webglrenderer. Unfortunately the mock HTMLCanvas provided by jsdom doesn't provide a WebGLRenderingContext, otherwise I would have used that.
Hmm right. The canvas package was for unit testing the WebGL bits, but If it turns out to be impractical to support the WebGL unit testing I guess we can leave those tests out. Or I wonder is it possible to somehow make these dependencies optional, so that they are only installed if the person who checks out the repo actually wants to run the tests, ie. on Linux? I'm guessing that's a bit convoluted, and maybe not possible?
Yes, at the moment it creates multiple HTML pages, one per tested package, but I was wondering if it were possible to instead compose the results into a single central HTML page, so the results of all tests could be checked at a glance, without navigating. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your replies @xeolabs Now I understand everything. I tried to run the tests that require the electron environment, but the package I will think about how to solve this problem, if I don't come up with anything, we will stick to the I'm already working on the summary report. It may take me a while, if the |
Beta Was this translation helpful? Give feedback.
-
@xeolabs could you look at https://github.com/capricorn86/happy-dom |
Beta Was this translation helpful? Give feedback.
-
Yeah that would be good. But as a fallback, it's also OK if those particular canvas-dependent tests are something that would only be run on Linux. |
Beta Was this translation helpful? Give feedback.
-
Actually, I am getting this issue when running tests, seems Jest can't find a certain mapping, so it fails some tests:
excerpt from the console output:
Seems it can't find that @xeokit/core mapping, but it is configured in |
Beta Was this translation helpful? Give feedback.
-
Can we place somewhere in documentation how to run the tests and is there a way to run all of them or only for each module? Locally |
Beta Was this translation helpful? Give feedback.
-
Hello,
after many hours I managed to run most of the tests. However, I have a problem with tests that use electron in their configuration, mainly with the use of this environment
@kayahr/jest-electron-runner
.I'm not sure if it's a bug in the
jest-electron-runner
package or if it's a difference in the Jest version, but are there any specific needs to use this package instead ofjsdom
?@xeolabs I saw that you recently added the
canvas
package, is it used and required somewhere? I'm asking because it makes development much more difficult on Windows, it requires the installation and compilation of theGTK
package, see: https://www.npmjs.com/package/canvas#compilingRecently we talked about the report in HTML, currently
test-report.html
is created for each package, is it supposed to stay that way or do you prefer to have tests in one collective place?Beta Was this translation helpful? Give feedback.
All reactions