keyv-api-tests

Test suite for Keyv API compliancy

Deprecated in favour of @keyv/test-suite
Last updated 3 years ago by lukechilds .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install keyv-api-tests 
SYNC missed versions from official npm registry.

keyv-api-tests

Test suite for Keyv API compliancy

Build Status Coverage Status npm

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

Usage

Install

Install AVA, Keyv and keyv-api-tests as development dependencies.

npm install --save-dev ava keyv keyv-api-tests

Then update keyv and keyv-api-tests 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 keyvApiTests from 'keyv-api-tests';
import Keyv from 'keyv';
import KeyvStore from './';

const store = new KeyvStore();
keyvApiTests(test, Keyv, store);

Where KeyvStore is your storage adapter.

Set your test script in package.json to ava.

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

Test on all supported Node.js versions

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 keyv-redis for an example of an existing storage adapter using keyv-api-tests.

License

MIT © Luke Childs

Current Tags

  • 1.2.0                                ...           latest (3 years ago)

9 Versions

  • 1.2.0 [deprecated]           ...           3 years ago
  • 1.1.1 [deprecated]           ...           3 years ago
  • 1.1.0 [deprecated]           ...           3 years ago
  • 1.0.2 [deprecated]           ...           3 years ago
  • 1.0.1 [deprecated]           ...           3 years ago
  • 1.0.0 [deprecated]           ...           3 years ago
  • 0.1.2 [deprecated]           ...           3 years ago
  • 0.1.1 [deprecated]           ...           3 years ago
  • 0.1.0 [deprecated]           ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (8)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |