Skip to content

Instantly share code, notes, and snippets.

@cuongld2
Created January 30, 2023 08:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cuongld2/0c97294bcd418663ae86ce36f56914d4 to your computer and use it in GitHub Desktop.
Save cuongld2/0c97294bcd418663ae86ce36f56914d4 to your computer and use it in GitHub Desktop.
test(`check websocket available`, async({}) => {
const ws = new WebSocket(`${endpoint.WEBSOCKET_HOST}/example/check`,{
headers: {
Cookie: `token=${accessToken}1`
}
});
ws.on('open', function open(){
ws.send("say something")
})
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment