Test if a Value Falls within a Specific Range - always fails
See original GitHub issueTest if a Value Falls within a Specific Range
Issue Description
The test always fails. It appears that there are two problems in /freeCodeCamp/seed/challenges/06-information-security-and-quality-assurance/quality-assurance-and-testing-with-chai.json:
- Test is checking unit test No. 10 but it should be No. 9 :
"title": "Test if a Value Falls within a Specific Range",
...
...
"testString": "getUserInput => $.get(getUserInput('url') + '/_api/get-tests?type=unit&n=10')
...
Here are the results to the get-tests glitch api, both with unit&n=9
and unit&n=10
query strings.
https://honeysuckle-crime.glitch.me/_api/get-tests?type=unit&n=10
{"title":"#isArray, #isNotArray","context":"Unit Tests -> Arrays","state":"failed","assertions":[{"method":"fail","args":["'isThisAnArray?'.split('')","'String.prototype.split() returns an Array'"]},{"method":"fail","args":["[1,2,3].indexOf(2)","'indexOf returns a number.'"]}]}
https://honeysuckle-crime.glitch.me/_api/get-tests?type=unit&n=9
{"title":"#isApproximately","context":"Unit Tests -> Comparisons","state":"passed","assertions":[{"method":"approximately","args":["weirdNumbers(0.5)","1","0.5"]},{"method":"approximately","args":["weirdNumbers(0.2)","1","0.8"]}]}
No. 10 is for the next challenge ( Test if Value is An Array )
-
Test is checking for the assertion method “isApproximately” but it should be “approximately”
`{ assert.equal(data.assertions[1].method, 'isApproximately'); `
Screenshot
I would be happy to tackle this one if FreeCodeCamp team agrees this is an issue.
Thank you.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Test if a Value Falls within a Specific Range - Guide
Check the error outputs, and try to understand what the +/- values in the errors mean with respect to a possible range of...
Read more >Checking if a value falls within a range which excludes a ...
I want to check the values in each Text column. The accepted range of values is from 1 to 10 (IMPORTANT: the range...
Read more >If statement that tests if a value is in range? - Arduino Forum
Hi I am trying to write a code that tests if a value is within a range of values. For example, I record...
Read more >How to return a value if lookup value is in a range
In this article, I will demonstrate four different formulas that allow you to lookup a value that is to be found in a...
Read more >How to correct a #VALUE! error in the IF function
Unfortunately, because of the complexity with which IF statements can be built, it is fairly easy to run into the #VALUE! error. You...
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
@Brybro sure thing, if you are ready please go ahead.
@Brybro - I was planning on subbing a PR for this but unfortunately didn’t get a chance to. Don’t want to speak for @raisedadead but I’d say go for it! 😃