3.0.1 • Published 6 years ago

clay-driver-tests v3.0.1

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
6 years ago

clay-driver-tests

Build Status npm Version JS Standard

Tests for ClayDB drivers

Installation

$ npm install clay-driver-tests --save-dev

Usage

'use strict'

const co = require('co')
const clayDriverTests = require('clay-driver-tests')
const { Driver } = require('clay-driver-base')

class CustomDriver extends Driver {
  /* ... */
}

{
  let driver = new CustomDriver({ /* ... */ })

  co(function * () {
    // Run all tests
    yield clayDriverTests.run(driver, {})
  }).catch((e) => {
    console.error('Test failed!')
    console.error(e)
  })
}

Cases

Available Test Cases

SignatureDescription
testCreate(driver, options)Test create method of driver
testDestroy(driver, options)Test destroy method of driver
testDrop(driver, options)Test drop method of driver
testList(driver, options)Test list method of driver
testOne(driver, options)Test one method of driver
testResources(driver, options)Test resources method of driver
testUpdate(driver, options)Test update method of driver

License

This software is released under the Apache-2.0 License.

Links