Test.js bug - only the last definition of test cases was checked due a javascript for loop variable

javascript, some bugs aren't obviously :)
Cheers Sandro