Tests for various challenges are too strict about line breaks before method calls (part 2)
See original GitHub issueNot all of the challenges listed in #35090 were fixed by #35093. This issue is for the remaining challenges that the aforementioned PR did not modify.
The problem
The tests for various challenges are too strict about line breaks before method calls.
E.g. something like this passes:
document.getElementById( 'getMessage' )
.onclick = function() {};
But this causes the tests to fail:
document
.getElementById( 'getMessage' )
.onclick = function() {};
Affected challenges
console.log(
json[2]
.codeNames[1]
);
if ( navigator.geolocation ) {
navigator.geolocation.getCurrentPosition(
pos => {
document.getElementById( 'data' )
.innerHTML =
'latitude: ' +
position.coords.latitude +
'<br />longitude' +
position.coords.longitude;
}
);
}
Browser and OS info
- Browser Name: Firefox Developer Edition
- Browser Version: 66.0b9
- Operating System: Antergos Linux
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Tests for various challenges are too strict about line breaks ...
The problem The tests for various challenges are too strict about line breaks before method calls. E.g. something like this passes: document ...
Read more >Testing | SpringerLink
A lot is said about testing in information technology. There are three reasons for the attention testing has gained during the last decades:...
Read more >Strict mode - JavaScript - MDN Web Docs
JavaScript's strict mode is a way to opt in to a restricted variant of JavaScript, thereby implicitly opting-out of "sloppy mode".
Read more >If you break long code lines, how do you indent the stuff on the ...
I like braces on their own line because I fine it easier to see the condition and inner block all as one item...
Read more >csv remove line breaks
How to remove the line break on csv file? 1. r remove all string before Python, Remove new line from CSV file. To...
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 have asked @ValeraS who has a very solid understanding of what helper utilities to which we have access.
@Ensive We have concluded for now, we will have to write our own as they do not want to add another package to the library. I think we should actually consider how we can test these types of challenges without resorting to using regex. For example, we should be validating that the code written actual returns the correct JSON response. That is the true test. We might look for a few key methods with regex, but not complete lines of code.