html-to-image
html-to-image copied to clipboard
Automated tests are broken: src/emdedWebFonts.ts
It seems like the tests are broken after forking master and running yarn test
Expected Behavior
Test to pass.
Current Behavior
Tests fail immediately.
Possible Solution
if ('cssRules' in sheet) {
try {
toArray<CSSRule>(sheet.hasOwnProperty('cssRules')).forEach(
Looks like the code assumes hasOwnProperty returns the sheet.cssRules instead it returns a boolean (true/false). The check just needs to be done separately.
Steps To Reproduce
yarn test
Error Message & Stack Trace
yarn run v1.22.17
$ rimraf ./test/coverage
$ karma start
25 03 2022 12:45:46.762:INFO [compiler.karma-typescript]: Compiling project using Typescript 4.4.3
25 03 2022 12:45:50.348:ERROR [compiler.karma-typescript]: src/embedWebFonts.ts(144,62): error TS2339: Property 'length' does not exist on type 'boolean'.
25 03 2022 12:45:50.348:ERROR [compiler.karma-typescript]: src/embedWebFonts.ts(173,76): error TS2339: Property 'length' does not exist on type 'boolean'.
error Command failed with exit code 1.
Additional Context
N/A
Your Environment
- html-to-image: master
- OS: macOS Monteray, zsh
- Browser: N/A
👋 @yagudaev
Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not-stale" to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request.
Thanks for being a part of the Antv community! 💪💯
not-stale
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not-stale" to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request.
Thanks for being a part of the Antv community! 💪💯
Tests have been fixed in our fork at https://github.com/RigoCorp/html-to-image/
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not-stale" to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request.
Thanks for being a part of the Antv community! 💪💯
@bubkoo Are you still maintaining this project? I am very curious why you have not pulled in the fix for the build, which has been broken since December.
@bubkoo can we help you somehow? I assume you are busy with other projects and can use some other maintainers to help close bugs and other issues.
I'm amazed how you and others find the time for OSS work; thank you so much ❤️.
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not-stale" to keep this issue open! As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request.
Thanks for being a part of the Antv community! 💪💯
@socram8888 could you create a PR from your fork?
Since https://github.com/bubkoo/html-to-image/commit/471ad8d68afa4413104c7c931087cc71d73d4020 passed CI, is this issue still relevant @bubkoo?