Skip to content
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

chore(test): cover jsx attributes #3452

Closed
wants to merge 1 commit into from
Closed

Conversation

exoego
Copy link
Contributor

@exoego exoego commented Sep 26, 2024

This PR is going to cover jsx-runtime.ts file which is covered 0% now.

https://app.codecov.io/github/honojs/hono/blob/main/src%2Fjsx%2Fjsx-runtime.ts
image

The author should do the following, if applicable

  • Add tests
  • Run tests
  • bun run format:fix && bun run lint:fix to format the code
  • Add TSDoc/JSDoc to document the code

Copy link

codecov bot commented Sep 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.52%. Comparing base (394a8f5) to head (d7bf2e2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3452   +/-   ##
=======================================
  Coverage   90.52%   90.52%           
=======================================
  Files         159      159           
  Lines       10179    10179           
  Branches     2843     2815   -28     
=======================================
  Hits         9215     9215           
  Misses        962      962           
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@exoego
Copy link
Contributor Author

exoego commented Sep 26, 2024

Hmm, I thought this PR can improve coverage on https://app.codecov.io/gh/honojs/hono/pull/3452/blob/src/jsx/jsx-runtime.ts#L43 but no changes ... 🤔

@usualoma
Copy link
Member

Hi @exoego.

Thank you for creating the pull request.

jsxAttr is a function used when Deno's “jsx”: “precompile” is used, and unit tests are run as follows.
https://github.com/usualoma/hono/blob/ebf9ea769bb638f4a12d553ec3ead3f3204a04e3/runtime-tests/deno-jsx/jsx.test.tsx#L114-L166

It would be good if we could reflect the coverage of Deno's runtime-tests, but as you can see from the following pull request, it's not as straightforward as it seems, and it's not currently being refrected.
#3456

@exoego
Copy link
Contributor Author

exoego commented Nov 6, 2024

Superseded by #3632

@exoego exoego closed this Nov 6, 2024
@exoego exoego deleted the test-jsx-runtime branch November 6, 2024 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants