You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Kiko Beats 8ff8aa8650
docs: fix namespace
3 years ago
..
src docs: tweaks 3 years ago
CHANGELOG.md chore(release): v1.1.1 3 years ago
README.md docs: fix namespace 3 years ago
package.json chore(release): v1.1.1 3 years ago

README.md

@keyvhq/test-suite keyv

Complete AVA test suite to test a Keyv storage adapter for API compliance.

Usage

Install

Install AVA, Keyv and @keyvhq/test-suite as development dependencies.

npm install --save-dev ava keyv @keyvhq/test-suite

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

Create Test File

test.js

import test from 'ava'
import keyvTestSuite from '@keyvhq/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.

"scripts": {
  "test": "ava"
}

Test on Active Node.js LTS and Higher

An example configuration for Travis CI would look like this:

.travis.yml

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

Example

Take a look at redis for an example of an existing storage adapter using @keyvhq/test-suite.

License

@keyvhq/test-suite © Microlink, Released under the MIT License.
Authored and maintained by Microlink with help from contributors.

microlink.io · GitHub @MicrolinkHQ · Twitter @microlinkhq