preactjs / preactjs/preact-render-to-string

support json output to allow for nicer interop with jest snapshot testing

Open
#16 15 comments 5 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

Right now using preact-render-to-string directly you end up with double encoding in the snapshot output
screen shot 2016-12-04 at 8 02 07 pm

see this twitter thread -- https://twitter.com/stillconor/status/805567906310451200 -- for more details.

cc @developit , I'd be interesting in taking this on if you could provide high level guidance on how this would would be worked on.

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 by reproducing the double-encoding described when using preact-render-to-string with Jest snapshot testing, and review the linked screenshot and Twitter discussion for the intended JSON output. Done means the renderer supports JSON output that produces correctly interoperable Jest snapshots without double encoding.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.