is that an old version of freecodecamp? the challenge seems changed since then, please provide this info when you ask for help, or you get help based on current version.
anyway, considerng that there is nothing that sets the background to black, I am going to hypotize you have a dark mode extension or something like that. Switch it off, it interfers with the tests.