question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Running the tests for core on a fresh pull of main fails with snapshot differences in the "style 1" test.

See original GitHub issue

I am interested in helping provide a fix!

Yes

Which generators are impacted?

  • All
  • Angular
  • HTML
  • Qwik
  • React
  • React-Native
  • Solid
  • Stencil
  • Svelte
  • Vue
  • Web components

Reproduction case

No case

Expected Behaviour

Tests pass on an unmodified branch.

Actual Behaviour

The snapshot fails looking like this. Seems like a prettier issue. Maybe a change in config?

  +   "hooks": {},
  +   "imports": [],
  +   "inputs": [],
  +   "meta": {},
  +   "name": "MyComponent",
  +   "refs": {},
  +   "state": {},
  +   "style": "
  +   input {
  +     color: red;
  +     font-size: 12px;
  +   }
    
  - .form-input:focus {
  -   outline: 1px solid blue;
  - }
  +   .form-input:focus {
  +     outline: 1px solid blue;
  +   }
  + 
    ",
  - "subComponents": [],
  +   "subComponents": [],
    }

Additional Information

No response

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
cmgriffingcommented, Dec 19, 2022

I am reopening this, because I still have this issue and it is making it difficult to make PRs.

Does anybody else experience this issue? If it is ONLY me, then we can close this again, but I wanted to get a feel for how common the problem was.

If it worked for you please react to this comment with a 👍

If it did not work for you please react to this comment with a 👎

1reaction
cmgriffingcommented, Dec 19, 2022

Yeah, I am not certain, but we have definitely narrowed it down to being just in my local.

A fully isolated VM works fine. So I will revert the snapshots and update the PR that I have hanging.

Interesting thing is that using Docker had the same issues as my local. Very confusing there. I will continue to look into it. Closing this for now until then.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Running the tests for core on a fresh pull of main fails with ...
Running the tests for core on a fresh pull of main fails with snapshot differences in the "style 1" test.
Read more >
What's wrong with snapshot tests. Since snapshot ... - Medium
Snapshots only verify that the component renders (meaning its HTML, not how it looks in the browser) the same thing, which is rarely...
Read more >
GitHub - origin-energy/java-snapshot-testing
Facebook style snapshot testing for JAVA Tests. Contribute to origin-energy/java-snapshot-testing development by creating an account on GitHub.
Read more >
Testing Your Application - Quarkus
If a test has a different profile to the previously run test then Quarkus will be shut down and started with the new...
Read more >
Testing with Jest - Expo Documentation
Learn how to set up and configure the jest-expo package to write unit tests and snapshot tests for a project.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found