Not passing any of the tests, but works

Not passing any of the tests, but works

My javascript calculator built with react hooks is not passing any of the tests but works just fine. Can I still submit it? Do you see any errors?

If you are not passing all of the tests, there is no point in submitting. If someone reviews your project and it does not pass the tests, then you would not be eligible for the certification. It only “works” if you meet the user story requirements. Otherwise, it is just a calculator app that you created and has nothing to do with the FCC curriculum.


but I did complete all of the user stories. For instance, " 1. My calculator should contain a clickable element containing an “=” (equal sign) with a corresponding id=“equals”" in my code:
In Calculator.js

<EqualBtn id="equals" />

In Equals.js

const EqualBtn = () => {
  const { doMath } = useContext(NumberContext);
  return (
    <button type="button" className="equal-btn" onClick={() => doMath()}>

export default EqualBtn;

I’m not sure why my code is not passing the tests.

No, you just passed a prop named id to your EqualBtn component but inside the return where the actual button element is which has the click event, there is no id attribute being used. You can look at the rendered code in the browser console and see there is no id on the button element.