Test should ignore whitespace
See original GitHub issueChallenge Override All Other Styles by using Important has an issue.
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:51.0) Gecko/20100101 Firefox/51.0
.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:
<style>
body {
background-color: black;
font-family: Monospace ;
color: green;
}
#orange-text {
color: orange ;
}
.pink-text {
color: pink !important ;
}
.blue-text {
color: blue;
}
</style>
<h1 id="orange-text" class="pink-text blue-text" style="color: white">Hello World!</h1>
Similar to #8511, test is not whitespace tolerant.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
toHaveTextContent should ignore whitespace #9 - GitHub
But I'm thinking that dom-testing-library should no longer depend on jest-dom . I think we should make a major version bump to make...
Read more >java - How to Ignore the white Spaces while compare two files?
This test method doesn't work. The contents of both files are equals, but they have different number of white spaces. How can I...
Read more >Compare Strings While Ignoring Whitespace in Java | Baeldung
Learn different ways to compare strings while ignoring whitespace in ... Using the replaceAll() method above will remove all spaces in our ...
Read more >How to ignore whitespace when asserting in ExUnit?
I am currently trying to write tests for some components I have been ... String.trim/1 that only works on leading and trailing whitespace....
Read more >equalsIgnoringWhitespace function - matcher library - Dart API
In this matcher, "ignoring whitespace" means comparing with all runs of whitespace collapsed to single space characters and leading and trailing whitespace ......
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
@BlauFeuer thanks for the issue. Yes, the test should be able to accommodate for spaces.
This line of code needs to be changed so that the regex is changed so that it allows zero or more spaces between
!important
and the semicolon.@BlauFeuer You should be able to rename your current branch using:
git branch -m new_branch
while on the branch you want to rename locally.Then you can re-push your changes with a
git push -u origin fix/branch-name-here --force
.You may need to commit again too between those two steps, though I’m not sure it will be necessary.
As for the guidelines, I think they do a good job of providing a first-timer with a full git experience which can be helpful to someone just getting into contributing.