Javascript and Testing client scripts