Most of the #Timer tests fails, but testing manually it seams to work. The values for the break time and session time got negative wile testing but never wen clicking normally (i manage to kind of fixing it, but i don’t believe i did it right). I rewrote this in different ways but always got the same result. Please help me.
This is my code:
https://codepen.io/leonardovieira25/pen/zYpmaWv
if it’s working normally and it’s functional, then good work. you did it👍
freeCodeCamp test codes don’t get along too well with the new render method of ReactDOM 18 (react strict mode)
.
Try replacing
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
with the old react rendering
ReactDOM.render(<App />, document.getElementById('id'));
3 Likes
Thank you! With this other method the tests are working perfectly!
leesze
June 16, 2022, 8:36am
4
Thank you! I spent so long on this because the tests kept failing though it was working manually. Switching to the old rendering method worked!
1 Like
This message is for people, who are facing similar issue, you can track the developer team progress in this issue here.
opened 05:23PM - 11 May 22 UTC
type: bug
scope: curriculum
I have edited this issue.
Code that is passing using React 17 is failing with… React 18.
It seems to be an issue with the new batch rendering and our tests. At this time, I'm not sure what the best solution is. I haven't really looked into it much.
### Affected Page
* Random Quote Machine
* The fCC example is using jQuery, I tested it with React 18 and it worked just fine.
* Markdown Previewer
* Works
* JavaScript Calculator ✅ (the example project is passing but we may have to use a longer delay as I have seen at least one project fail with the new test code. I have not yet tested that code with a longer delay)
* 9/16 passed
* Example - https://codepen.io/lasjorg/pen/JjpRybg
* 25 + 5 Clock
* 13/29 passed (The test is no longer able to manipulate the timer so it is slow to test)
* Example - https://codepen.io/lasjorg/pen/WNMGEOM
* Drum Machine (fixed) ✅
* 7/8 passed
* Example - https://codepen.io/lasjorg/pen/jOZrXGv
Tests: https://github.com/freeCodeCamp/testable-projects-fcc/blob/main/src/project-tests/
### Additional context
Forum threads:
https://forum.freecodecamp.org/t/drum-machine-test-7-is-failing/507800/
https://forum.freecodecamp.org/t/stuck-on-drum-machine-test-7/508120/
https://forum.freecodecamp.org/t/25-5-clock-pomodoro-timer-not-passing-test-12-decrease-break-time/504446/12
https://forum.freecodecamp.org/t/my-tests-don-t-make-sense-in-my-25-5-clock/504936
Know that this issue is more difficult than it seems, and the volunteers are doing what they can.
Have a nice day and happy coding
1 Like
Thank you very much! This solved the problem!
system
Closed
January 12, 2023, 12:52pm
7
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.