-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Tests are unstable #5
Comments
You can try setting Unfortunately, that still doesn't help everywhere: I just had to fix a bug in the entity relationship diagrams that weren't deterministic, see mermaid-js/mermaid#3916. There's also some discussion in mermaid-js/mermaid#3491 about test snapshots in Mermaid, but it's mainly centered around rendered
|
Thanks for the suggestions and cross-referencing related issues! It helps to have this information together. The problem isn’t really deterministic IDs though. It’s mostly pixel offsets. The tests are relatively stable on my machine. In #17 Bruce says they are for him too. I’m inclined to believe they are in CI too. The problem is that they are unstable across different environments. I like the idea of adding support for different output options, such as SVG or PNG data URLs. They would be a additional options though, not a replacement. |
It might help to make sure all environments have the same fonts installed. Mermaid defaults to using (my wishlist is for Mermaid to default to using an open-source font like Atkinson Hyberlegible) I doubt you'll get it to be pixel perfect on all environments though. I've heard that ARM-based CPUs and x86_64 CPUs both render CSS shadows slightly differently. My gut feeling is that ClearType/FreeType might also change how text is rendered, depending on what sub-pixel arrangement your screen has, so plugging an external monitor into your laptop might change the output!
If you do add SVG data URLs to your project, then I'll be able to archive my https://github.com/aloisklink/remark-mermaid-dataurl! Or convert it to a wrapper that uses this plugin. |
This issue has been solved by 2312642 and 236c16c.
|
The tests are currently unstable due to the unstable output of mermaid. As a result I had to allow test failures in CI, which is really bad. I’m open to suggestions to make the tests more stable.
The text was updated successfully, but these errors were encountered: