1.1.0 • Published 2 years ago

@jrh/scout v1.1.0

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

@jrh/scout

Test the behavior of Node.js functions which reach beyond your application's boundaries.

Installation

npm install @jrh/scout

Logging

scout will log status updates if the environment variable monitor is set to true.

Functions

.ensureCount()

Usage

const { ensureCount } = require('@jrh/scout')

Syntax

ensureCount(count, target, options)

Arguments

NameTypeDescription
countNumberThe number of records to ensure in the result.
targetFunctionThe function to test.
optionsObjectA configuration object (details below).

Options

AttributeTypeDescriptionDefault
delayNumberMilliseconds to wait between retries.1000
retriesNumberNumber of times to retry.10

Exceptions

Throws a standard Error if:

  • The function does not return the expected number of records within the allowed number of retries.
1.1.0

2 years ago

1.0.0

2 years ago