Cleaner fix for race condition bugs in JS code hints unit tests.