Testing websockets with js