I also ran into this problem, so I searched this forum and found this topic: Test scripts not working in local development environment.
The solution is to use a different CDN link:
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
It works for me