html-to-image icon indicating copy to clipboard operation
html-to-image copied to clipboard

Automated tests are broken: src/emdedWebFonts.ts

Open yagudaev opened this issue 2 years ago • 11 comments

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 avatar Mar 25 '22 19:03 yagudaev

👋 @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.

vivcat[bot] avatar Mar 25 '22 19:03 vivcat[bot]

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! 💪💯

vivcat[bot] avatar Apr 15 '22 01:04 vivcat[bot]

not-stale

yagudaev avatar Apr 15 '22 19:04 yagudaev

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! 💪💯

vivcat[bot] avatar May 06 '22 01:05 vivcat[bot]

Tests have been fixed in our fork at https://github.com/RigoCorp/html-to-image/

socram8888 avatar Jun 05 '22 18:06 socram8888

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! 💪💯

vivcat[bot] avatar Jun 26 '22 02:06 vivcat[bot]

@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.

insanityfarm avatar Jul 07 '22 22:07 insanityfarm

@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 ❤️.

yagudaev avatar Jul 09 '22 18:07 yagudaev

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! 💪💯

vivcat[bot] avatar Jul 30 '22 02:07 vivcat[bot]

@socram8888 could you create a PR from your fork?

rooby avatar Sep 23 '22 04:09 rooby

Since https://github.com/bubkoo/html-to-image/commit/471ad8d68afa4413104c7c931087cc71d73d4020 passed CI, is this issue still relevant @bubkoo?

yagudaev avatar Sep 23 '22 05:09 yagudaev