The reason the console output repeats is because when you run the tests, you are actually running the function you made once for each test.
So 1 console.log easily becomes five or more, depending on the number of tests you need to pass.
The quick trick I use is to just paste the code into the dev console to run it once and see the output: