When I run the tests in my project it fails on the first test (#Technology Stack), although the only framework I’m using is React. But the strange is that if a start the clock in the app and then run the tests, it passes.
I checked my code searching the reason for this behavior, but I didn’t understand why this is happening.
Another strange behavior is on the test results that I got. Even when the first test passes (running tests after start the app clock) I get diferent results. Usually it passes in all tests, but sometimes (generally when run test twice or more) I get a few tests fails. And when I get fails they are in different tests. So the results are incosistent.
I don’t know if is something wrong I did in my code (probably is) or if it is an error in the Test Suit
Sorry it has taken so long for someone to reply to your post. Sometimes, depending on who is on, how active campers are with other posts, etc. topics just fall between the cracks.
I do see what you mean by test failing on the first criterion, unless the timer has been started.
However, after multiple runs, the timer always fails only one test:
When I click the element with the id of “reset”, any running timer should be stopped, the value within id=“break-length” should return to 5, the value within id=“session-length” should return to 25, and the element with id=“time-left” should reset to it’s default state.
Also, this error is visible in the browser console:
Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause(). https://goo.gl/LdLk22
To be honest, one of the reasons topics go without answers, is because there are far fewer campers willing and able to answer questions about this challenge.
It is too late today, for me to go through your code, but I have seen it too often where campers have a small logic error in their code relating to the order in which they start/stop/reset the timer, which yields the results I see with your timer.
If I remember, I will try to go through your code to double-check.