UNPKG

neweb

Version:

[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coveralls-image]][coveralls-url] [![experimental](http://badges.github.io/stability-badges/dist/ex

19 lines (18 loc) 479 B
class Socket { public static instance: Socket; public on = jest.fn(); public removeAllListeners = jest.fn(); public request = { headers: { cookie: "sessid=sid1", }, cookies: undefined, }; public conn = { remoteAddress: "127.0." + Math.floor(Math.random() * 254) + "." + Math.floor(Math.random() * 254), }; constructor() { Socket.instance = this; } } export default Socket;