Running the tests for core on a fresh pull of main fails with snapshot differences in the "style 1" test.
See original GitHub issueI 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:
- Created 9 months ago
- Comments:5 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 👎
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.