javascript testing and concepts