Create js helper method for javascript integration tests