# keyv-test-suite

> Test suite for Keyv API compliancy

Latest version **1.5.0** (published 2017-08-03) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install keyv-test-suite
pnpm add keyv-test-suite
yarn add keyv-test-suite
bun add keyv-test-suite
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.5.0 |
| Published | 2017-08-03 |
| First published | 2017-07-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Luke Childs |
| Maintainers | lukechilds |
| Keywords | test, suite, tests, key, value, store, cache, ttl |

## Links

- npm: https://www.npmjs.com/package/keyv-test-suite
- Repository: https://github.com/lukechilds/keyv-test-suite
- Issues: https://github.com/lukechilds/keyv-test-suite/issues
- npm.io page: https://npm.io/package/keyv-test-suite

## Dependencies (2)

- [delay](https://npm.io/package/delay.md) ^2.0.0
- [timekeeper](https://npm.io/package/timekeeper.md) ^1.0.0

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 1.5.0 (latest) — 2017-08-03
- 1.4.2 — 2017-07-29
- 1.4.1 — 2017-07-29
- 1.4.0 — 2017-07-26
- 1.3.0 — 2017-07-25

## README

# keyv-test-suite [<img width="100" align="right" src="https://rawgit.com/lukechilds/keyv/master/media/logo.svg" alt="keyv">](https://github.com/lukechilds/keyv)

> Test suite for Keyv API compliancy

[![Build Status](https://travis-ci.org/lukechilds/keyv-test-suite.svg?branch=master)](https://travis-ci.org/lukechilds/keyv-test-suite)
[![Coverage Status](https://coveralls.io/repos/github/lukechilds/keyv-test-suite/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/keyv-test-suite?branch=master)
[![npm](https://img.shields.io/npm/v/keyv-test-suite.svg)](https://www.npmjs.com/package/keyv-test-suite)

Complete [AVA](https://github.com/avajs/ava) test suite to test a [Keyv](https://github.com/lukechilds/keyv) storage adapter for API compliancy.

## Usage

### Install

Install AVA, Keyv and `keyv-test-suite` as development dependencies.

```shell
npm install --save-dev ava keyv keyv-test-suite
```

Then update `keyv` and `keyv-test-suite` versions to `*` in `package.json` to ensure you're always testing against the latest version.

### Create Test File

`test.js`

```js
import test from 'ava';
import keyvTestSuite from 'keyv-test-suite';
import Keyv from 'keyv';
import KeyvStore from './';

const store = () => new KeyvStore();
keyvTestSuite(test, Keyv, store);
```

Where `KeyvStore` is your storage adapter.

Set your test script in `package.json` to `ava`.
```json
"scripts": {
  "test": "ava"
}
```

### Test on Active Node.js LTS and Higher

An example configuration for Travis CI would look like this:

`.travis.yml`

```yaml
language: node_js
node_js:
  - '8'
  - '6'
  - '4'
script: npm test
```

## Example

Take a look at [keyv-redis](https://github.com/lukechilds/keyv-redis) for an example of an existing storage adapter using `keyv-test-suite`.

## License

MIT © Luke Childs

---
_Source: https://npm.io/package/keyv-test-suite · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
