Fix the test and beautify the test javascript file.