Remove duplication in client_test.js file