2.1.5 • Published 11 months ago

@keyvhq/test-suite v2.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@keyvhq/test-suite

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 '@keyvhq/core'
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 © Luke Childs, released under the MIT License. Maintained by Microlink with help from contributors.

microlink.io · GitHub microlinkhq · X @microlinkhq

2.1.5

11 months ago

2.0.3

2 years ago

2.0.0-beta.0

2 years ago

2.0.0

2 years ago

1.6.26

2 years ago

1.6.13

3 years ago

1.6.0

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago