UNPKG

newsie

Version:

An NNTP Client Library targeting NodeJS. It supports the authentication, TLS encryption, base NNTP commands, and more.

13 lines (10 loc) 284 B
export class Socket { public on = jest.fn() public once = jest.fn() public destroy = jest.fn() public write = jest.fn((chunk, encodingOrCallback, callback) => { callback() }) } export const _socket = new Socket() export const createConnection = jest.fn(() => _socket)