模拟套接字:用于WebSockets和Socket.IO的Javascript模拟库 源码
用于和Javascript模拟库 内容 安装 npm install mock-socket import { WebSocket , Server } from 'mock-socket' ; 用法 import test from 'ava' ; import { Server } from 'mock-socket' ; class ChatApp { constructor ( url ) { this . messages = [ ] ; this . connection = new WebSocket ( url ) ; this . connect
用户评论