Kronos-Integration/kronos-test-interceptor

View on GitHub
README.md

Summary

Maintainability
Test Coverage
[![npm](https://img.shields.io/npm/v/@kronos-integration/test-interceptor.svg)](https://www.npmjs.com/package/@kronos-integration/test-interceptor)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
[![bundlejs](https://deno.bundlejs.com/?q=@kronos-integration/test-interceptor\&badge=detailed)](https://bundlejs.com/?q=@kronos-integration/test-interceptor)
[![downloads](http://img.shields.io/npm/dm/@kronos-integration/test-interceptor.svg?style=flat-square)](https://npmjs.org/package/@kronos-integration/test-interceptor)
[![GitHub Issues](https://img.shields.io/github/issues/Kronos-Integration/test-interceptor.svg?style=flat-square)](https://github.com/Kronos-Integration/test-interceptor/issues)
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2FKronos-Integration%2Ftest-interceptor%2Fbadge\&style=flat)](https://actions-badge.atrox.dev/Kronos-Integration/test-interceptor/goto)
[![Styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![Known Vulnerabilities](https://snyk.io/test/github/Kronos-Integration/test-interceptor/badge.svg)](https://snyk.io/test/github/Kronos-Integration/test-interceptor)
[![Coverage Status](https://coveralls.io/repos/Kronos-Integration/test-interceptor/badge.svg)](https://coveralls.io/github/Kronos-Integration/test-interceptor)

# @kronos-integration/test-interceptor

test support for kronos interceptors

# API

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

### Table of Contents

*   [interceptorTest](#interceptortest)
    *   [Parameters](#parameters)

## interceptorTest

### Parameters

*   `t` **ava** ava test runner
*   `factory` **Class** interceptor Class
*   `config` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** to assing
*   `expected` **any**  (optional, default `{}`)
*   `endpoint` **Endpoint** endpoint to assign
*   `args` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**  (optional, default `[]`)
*   `next` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)**  (optional, default `(...args)=>0`)
*   `asserts`   (optional, default `()=>{}`)

# install

With [npm](http://npmjs.org) do:

```shell
npm install @kronos-integration/test-interceptor
```

# license

BSD-2-Clause