Improved logging in JS tests.