waterline-adapter-tests

1.0.1 • Public • Published

Waterline Adapter Tests

Build Status npm version Dependency Status

A set of integration tests that can be included in your Waterline Adapter module and used to test your adapter against the current Waterline API.

Adapter Interface Specification

Usage

Write a test runner

i.e. runner.js

/**
 * Test runner dependencies
 */
var mocha = require('mocha');
var TestRunner = require('waterline-adapter-tests');
 
 
/**
 * Integration Test Runner
 *
 * Uses the `waterline-adapter-tests` module to
 * run mocha tests against the specified interfaces
 * of the currently-implemented Waterline adapter API.
 */
new TestRunner({
 
    // Load the adapter module.
    adapter: require('./relative/path/to/your/adapter'),
 
    // Default adapter config to use.
    config: {
        schema: false
    },
 
    // The set of adapter interfaces to test against.
    interfaces: ['semantic', 'queryable']
});

Run the tests

$ node runner.js

MIT License

See LICENSE.md.

/waterline-adapter-tests/

    Package Sidebar

    Install

    npm i waterline-adapter-tests

    Weekly Downloads

    583

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    262 kB

    Total Files

    128

    Last publish

    Collaborators

    • balderdashy
    • dmarcelino
    • mikermcneil
    • particlebanana
    • rachaelshaw
    • sgress454