I am building the FCC Front-end Libraries project ‘25 + 5 clock’.
To the best of my knowledge, all the tests that I have performed seem to indicate that the project is meeting all the use cases. However, when I run the FCC test the test score is ‘16/29 Passed’.
When I look at the test result in more detail there appears to be a consistent pattern. The tests return a value of ‘Some String\n’ where ‘Some String’ is either ‘Break Length’ or ‘Session Length’ and n is the numerical return value of the tests. This is then compared to the expected test result. In all cases the tests would pass when comparing the numerical values except for the tests returning a string concatenation with a numerical value. I cannot see how my project can produce an output as is suggested which leads me to suspect that something has gone awry with the tests themselves.
I hope there is someone who can make some suggestions as to how I can proceed from here.
Many thanks. Thomas.
The general pattern of the error messages for the failing tests is:
expected **'"some string"\n'** to equal **'expected test value'**
The error messages are as follows:
#Content
-
A value of 5 is not displayed by default: expected ‘Break Length\n5’ to equal ‘5’
-
A value of 25 is not displayed by default: expected ‘Session Length\n25’ to equal ‘25’
#Timer
-
Default values for break length were not properly reset: expected ‘Break Length\n5’ to equal ‘5’
-
expected ‘Break Length\n1’ to equal ‘1’
-
expected ‘Break Length\n9’ to equal ‘9’
-
expected ‘Session Length\n21’ to equal ‘21’
-
expected ‘Session Length\n29’ to equal ‘29’
-
Value in element with id of “break-length” is less than 1.: expected ‘Break Length\n1’ to equal ‘1’
-
Value in element with id of “break-length” is greater than 60.: expected ‘Break Length\n60’ to equal ‘60’
-
expected ‘25’ to equal ‘Session Length\n25’
-
Break time didn’t start with the correct value.: expected 4 to be at most NaN
-
Timer has switched to Break time, but it didn’t start with the correct value.: expected 4 to equal NaN
-
Timer has switched back to Session time, but it didn’t start with the correct value.: expected 0 to equal NaN
My code can be viewed in the following CodePen: https://codepen.io/ThomasDirkse/pen/MWrOBXe?editors=0100
FCC Challenge:
https://www.freecodecamp.org/learn/front-end-development-libraries/front-end-development-libraries-projects/build-a-25–5-clock