New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

hemera-testsuite

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hemera-testsuite

Helper library to write tests against NATS.

latest
Source
npmnpm
Version
4.1.0
Version published
Weekly downloads
2.9K
-9.59%
Maintainers
1
Weekly downloads
 
Created
Source

npm Build Status Gitter js-standard-style

hemera-testsuite

Helper library to write tests against NATS.

Use cases

  • You want to create an integration test (cluster support)
  • You want to run in-memory tests

Prerequisites

Install NATS Server and include the path to the executable in your user PATH environment variable. (Only needed for integration tests)

Installing

npm i hemera-testsuite

Emulate NATS

We emulate all core features of NATS server. You can run and test your service in memory.

Features

  • Support of wildcard * and > subjects
  • Support for maxMessages$, expectedMessages$ options
  • Support for request & publish
  • Support for timeouts

Not supported*

  • Custom queue groups
  • Special one-to-one publish
  • Load balancing
  • Connection related states

*In this case we recommend to start a real NATS Server.

const Hemera = require('nats-hemera')
const Nats = require('hemera-testsuite/nats')
const nats = new Nats()
const hemera = new Hemera(nats, {
  logLevel: 'info'
})

Full Integration test

  • Run your tests against a real NATS server

Example

Credits

Thanks to node-nats for providing the script to bootstrap the server.

FAQs

Package last updated on 31 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts