Integrating testing and js validation