Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

waterline-adapter-tests

balderdashy2.3kMIT1.0.1

Integration tests for waterline adapters

orm, tests, waterline, adapters, sails, mysql, postgresql, mongo

readme

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.

changelog

Waterline Adapter Tests Changelog

0.12.1

  • [ENHANCEMENT] Updated Mocha, Should, and NPM dependencies to remove warning messages when installing.

0.12.0

  • [ENHANCEMENT] Added tests for working with projections in Waterline. See #106 for more details.

0.11.1

  • [BUG] Upgraded the Waterline dependency to the 0.11 version.

0.11.0

  • [UPGRADE] Add test that checks the new function signature of .save() in Waterline 0.11.0
  • [ENHANCEMENT] Add a Docker config for getting all the various databases installed and configured to run the tests.

0.10.19

  • [BUG] Fix previous date test that only checked CST

0.10.18

  • [ENHANCEMENT] Add a test for querying dates when they are a string. See #100 for more details.

0.10.17

  • [STABILITY] Skip failing binary test that isn't compatible with Waterline feature set. This was hiding actual patches that break core or another adapter. See #98 for more details.

  • [STABILITY] Skip incorrect auto-increment test. See #99 for more details.

  • [ENHANCEMENT] Update Travis config to add Node 4.0 and 5.0. See #97 for more details.

  • [ENHANCEMENT] Added test for migrate: 'create' in the migratable interface. See #34 for more details. Thanks @dmarcelino!