preactjs / preactjs/preact-render-to-string

renderToString issue with istanbul and function as child components

Open
#82 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
726
Forks
101
Avg merge
3d 6h
Merged PRs (30d)
6

Description

I found this issue whilst comparing snapshots made with jest with and without coverage. When --coverage adds the istanbul babel plugin it adds random elements to the output.

I made a repo where you can see this in action: https://github.com/PepijnSenders/istanbul-preact-render-spy-bug

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked reproduction repository and compare the snapshots produced with Jest with and without coverage enabled. Investigate the output changes introduced when the Istanbul Babel plugin is added; done means coverage no longer adds random elements to renderToString output.

Written by the indexing model from the issue text.

Assessment

Tech stack
babel, javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.