|
|
@ -1,10 +1,10 @@ |
|
|
|
# keyv-api-tests |
|
|
|
# keyv-test-suite |
|
|
|
|
|
|
|
> Test suite for Keyv API compliancy |
|
|
|
|
|
|
|
[![Build Status](https://travis-ci.org/lukechilds/keyv-api-tests.svg?branch=master)](https://travis-ci.org/lukechilds/keyv-api-tests) |
|
|
|
[![Coverage Status](https://coveralls.io/repos/github/lukechilds/keyv-api-tests/badge.svg?branch=master)](https://coveralls.io/github/lukechilds/keyv-api-tests?branch=master) |
|
|
|
[![npm](https://img.shields.io/npm/v/keyv-api-tests.svg)](https://www.npmjs.com/package/keyv-api-tests) |
|
|
|
[![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. |
|
|
|
|
|
|
@ -12,13 +12,13 @@ Complete [AVA](https://github.com/avajs/ava) test suite to test a [Keyv](https:/ |
|
|
|
|
|
|
|
### Install |
|
|
|
|
|
|
|
Install AVA, Keyv and `keyv-api-tests` as development dependencies. |
|
|
|
Install AVA, Keyv and `keyv-test-suite` as development dependencies. |
|
|
|
|
|
|
|
```shell |
|
|
|
npm install --save-dev ava keyv keyv-api-tests |
|
|
|
npm install --save-dev ava keyv keyv-test-suite |
|
|
|
``` |
|
|
|
|
|
|
|
Then update `keyv` and `keyv-api-tests` versions to `*` in `package.json` to ensure you're always testing against the latest version. |
|
|
|
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 |
|
|
|
|
|
|
@ -26,12 +26,12 @@ Then update `keyv` and `keyv-api-tests` versions to `*` in `package.json` to ens |
|
|
|
|
|
|
|
```js |
|
|
|
import test from 'ava'; |
|
|
|
import keyvApiTests from 'keyv-api-tests'; |
|
|
|
import keyvTestSuite from 'keyv-test-suite'; |
|
|
|
import Keyv from 'keyv'; |
|
|
|
import KeyvStore from './'; |
|
|
|
|
|
|
|
const store = new KeyvStore(); |
|
|
|
keyvApiTests(test, Keyv, store); |
|
|
|
keyvTestSuite(test, Keyv, store); |
|
|
|
``` |
|
|
|
|
|
|
|
Where `KeyvStore` is your storage adapter. |
|
|
@ -60,7 +60,7 @@ 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-api-tests`. |
|
|
|
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 |
|
|
|
|
|
|
|