JavaScript is commonly used for testing due to its asynchronous nature and promise-based libraries that simplify asynchronous code. While JavaScript testing libraries use promises to handle asynchronous code, this can lead to "pyramid of doom" or "callback hell" code structures. New async/await syntax in JavaScript helps address this by allowing asynchronous code to be written in a simpler, synchronous-looking way. Popular JavaScript testing libraries like WebDriverJs support async/await to make asynchronous testing code more readable and maintainable.