How to use the loopback-datasource-juggler.test function in loopback-datasource-juggler

To help you get started, we’ve selected a few loopback-datasource-juggler examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github strongloop / loopback-connector-mssql / test / commontests.js View on Github external
// Copyright IBM Corp. 2013,2018. All Rights Reserved.
// Node module: loopback-connector-mssql
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

'use strict';
const jdb = require('loopback-datasource-juggler');
const commonTest = jdb.test;

require('./init');

/* global getDataSource */
const schema = getDataSource();

// run the tests exposed by jugglingdb
commonTest(module.exports, schema);

// skip the order test from jugglingdb, it wasn't working right
commonTest.skip('should handle ORDER clause');

// re-implement the order test as pretty much the same thing, but run an automigration beforehand
commonTest.it('should automigrate', function(test) {
  schema.automigrate(function(err) {
    test.ifError(err);