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

fix: improve element formatting #122

Merged
merged 2 commits into from
Oct 21, 2022
Merged

Conversation

mdjastrzebski
Copy link
Collaborator

@mdjastrzebski mdjastrzebski commented Oct 20, 2022

What:

Improve element formatting in output messages:

Before:

Received element is visible:
  Object {
  "props": Object {
    "children": undefined,
    "testID": "test",
  },
}

After:

Received element is visible:
  <View
    testID="test"
  />

Why:

Improve readability for printed element

How:

Persuade ReactTestComponent plugin to pretty-format package that passed element is ReactTestRendererJSON instance, so that if formats it as JSX.

Checklist:

  • Documentation added to the
    docs N/A
  • Typescript definitions updated N/A
  • Tests
  • Ready to be merged

@codecov
Copy link

codecov bot commented Oct 20, 2022

Codecov Report

Merging #122 (b58f48e) into main (1b65ce3) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #122   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines          175       175           
  Branches        57        57           
=========================================
  Hits           175       175           
Flag Coverage Δ
node-14 100.00% <100.00%> (ø)
node-16 100.00% <100.00%> (ø)
node-18 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/utils.ts 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@MichaelDeBoey MichaelDeBoey changed the title feat: improve element formatting tests: improve element formatting Oct 21, 2022
@mdjastrzebski mdjastrzebski changed the title tests: improve element formatting fix: improve element formatting Oct 21, 2022
@mdjastrzebski mdjastrzebski merged commit b36fc6c into main Oct 21, 2022
@github-actions
Copy link

🎉 This PR is included in version 5.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@MichaelDeBoey MichaelDeBoey deleted the feat/improve-element-formatting branch October 21, 2022 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants