Closed antoniel closed 11 months ago
Name | Link |
---|---|
Latest commit | c840b91d18ab984c59d5608567a404d5d027014f |
Latest deploy log | https://app.netlify.com/sites/jest-preview-chinese/deploys/63f24b96471a8500081d935d |
Name | Link |
---|---|
Latest commit | c840b91d18ab984c59d5608567a404d5d027014f |
Latest deploy log | https://app.netlify.com/sites/jest-preview-library/deploys/63f24b969d944600084dc97d |
Summary/Motivation (TLDR;)
This PR adds a new feature to the Jest Preview library that allows developers to pass HTML output generated by other libraries to the
debug
function. Specifically, this PR replaces the current implementation of thedebug
function in/src/preview.ts
with a new function that accepts an HTML string as a parameter. This makes it possible for developers to use other libraries (such as react-native-to-jest-preview) to generate the HTML output for Jest Preview.Related issues
290
Features
debug
function to accept an HTML string generated by other librariesdebug
function in/src/preview.ts
with a new implementation that accepts an HTML string parameterFixes
Chores
Changes Made
This PR modifies the
/src/preview.ts
file to add support for passing an HTML string to thedebug
function. Specifically, thedebug
function has been replaced with a new function that accepts anouterHTML
parameter. If the parameter is not provided, the function falls back to the previous behavior of usingdocument.documentElement.outerHTML
.Here is the specific change that was made: