Skip to content

Do you need to import the WebSocket in this example? #386

Description

@JJ

In this code

mock-socket/README.md

Lines 39 to 44 in 47eab99

import { Server } from 'mock-socket';
class ChatApp {
constructor(url) {
this.messages = [];
this.connection = new WebSocket(url);

is WebSocket a regular one, or should it be imported from the library so that it can be mocked. In other word, is the URL mocked or the URL and the websocket?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions