Framework for testing third-party JavaScript applications