@keyv/test-suite
Test suite for Keyv API compliancy
Last updated 3 years ago by lukechilds .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @keyv/test-suite 
SYNC missed versions from official npm registry.

@keyv/test-suite keyv

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/test-suite as development dependencies.

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

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.

"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 keyv-redis for an example of an existing storage adapter using @keyv/test-suite.

License

MIT © Luke Childs

Current Tags

  • 1.6.11                                ...           latest (3 years ago)

14 Versions

  • 1.6.11                                ...           3 years ago
  • 1.6.10                                ...           3 years ago
  • 1.6.9                                ...           3 years ago
  • 1.6.8                                ...           3 years ago
  • 1.6.7                                ...           3 years ago
  • 1.6.6                                ...           3 years ago
  • 1.6.5                                ...           3 years ago
  • 1.6.4                                ...           3 years ago
  • 1.6.3                                ...           3 years ago
  • 1.6.2                                ...           3 years ago
  • 1.6.1                                ...           3 years ago
  • 1.6.0                                ...           3 years ago
  • 1.5.2                                ...           3 years ago
  • 1.5.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 15
Last Day 0
Last Week 0
Last Month 4
Dependencies (2)
Dev Dependencies (10)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |