Test fails on "Only change the first line"
See original GitHub issueChallenge subtract-one-number-from-another-with-javascript has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36
.
Please describe how to reproduce this issue, and include links to screenshots if possible.
This fails due to the difference in lines even if code has not been changed. It also fails when changing 0 to 33.
var difference = 45 - 0;
Issue Analytics
- State:
- Created 7 years ago
- Comments:23 (14 by maintainers)
Top Results From Across the Web
Java: test System output including "new lines" with assertEquals
A quick platform-independent solution can be to replace the line ... Then you can give a better problem description if the test fails....
Read more >Simple tests pass in opened UI but fail on command line ...
Simple tests against web-app work, but when I run them in the headless mode, they fail and the error given is an application...
Read more >Testing-library: avoid these mistakes in async tests
Sometimes, tests start to unexpectedly fail even if no changes were made to the business logic. It may happen after e.g. you updated...
Read more >Testing in Go: Failing Tests - Ilija Eftimov
Golang's testing package promotes two types of failures. The first failure type immediately stops the tests from running. And the second failure ...
Read more >unittest — Unit testing framework — Python 3.11.1 ...
Changed in version 3.2: In earlier versions it was only possible to run individual test methods and not ... Stop the test run...
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
@erictleung It makes sense, then let’s make it 3 and add this test case to addition, multiplication and division challenges.
This issue stems probably because the “solution” in the
.json
file is included in the code the regex checks (see similar discussion https://github.com/freeCodeCamp/freeCodeCamp/pull/11987#discussion_r92950694). The code is to check that you don’t just create another variabledifference
and assign it to 12. So I think it’s necessary. Just need to either remove the solution or change the test to check for two instances.