0.0.2 • Published 4 years ago

@onichandame/mock-nats-client v0.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Mock NATS Client

A mocked NATS client for unit test. All messaging actions are carried out in memory only.

Has the same function signature and typing with the original ts-nats library.

Author

onichandame

Usage

Installation

yarn add @onichandame/mock-nats-client

Connection

import { connect } from '@onichandame/mock-nats-client'

const nc = await connect()

Subscribe:

nc.subscribe('subject', (e, msg) => console.log(msg.data))

Publish:

nc.publish('subscribe', {})

Any feature request or bug report is welcome.

0.0.2

4 years ago

0.0.1

4 years ago

0.0.0

4 years ago