@updater/test-utils

Test helpers for services at Updater

Usage no npm install needed!

<script type="module">
  import updaterTestUtils from 'https://cdn.skypack.dev/@updater/test-utils';
</script>

README

Services Test Utils

Simple test utilities for services.

Usage

Initialization

test-utils takes a config object at initialization.

const testUtils = require('@updater/test-utils')({
  amqpUrl: 'amqp://localhost'
})

AMQP Wrap

API

{ amqpWrap } = testUtils
const queue = 'queue'
const exchange = 'exchange'
const route = 'route'
amqpWrap(queue, exchange, route, async channel => {
  // Some tests that will get cleaned up
})