hono icon indicating copy to clipboard operation
hono copied to clipboard

chore(test): cover jsx attributes

Open exoego opened this issue 1 year ago • 3 comments

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

exoego avatar Sep 26 '24 05:09 exoego

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Sep 26 '24 05:09 codecov[bot]

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

exoego avatar Sep 26 '24 05:09 exoego

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. https://github.com/honojs/hono/pull/3456

usualoma avatar Sep 28 '24 05:09 usualoma

Superseded by #3632

exoego avatar Nov 06 '24 07:11 exoego