loopback-datasource-juggler/test/init.js

35 lines
796 B
JavaScript
Raw Normal View History

2016-04-01 22:25:16 +00:00
// Copyright IBM Corp. 2013,2016. All Rights Reserved.
// Node module: loopback-datasource-juggler
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
2016-08-22 19:55:22 +00:00
'use strict';
2013-04-06 10:57:12 +00:00
module.exports = require('should');
/*
2014-01-24 17:09:53 +00:00
if (!process.env.TRAVIS) {
if (typeof __cov === 'undefined') {
process.on('exit', function () {
require('semicov').report();
});
}
2014-01-24 17:09:53 +00:00
require('semicov').init('lib');
}
*/
2013-03-26 00:39:47 +00:00
2014-08-30 08:53:10 +00:00
var ModelBuilder = require('../').ModelBuilder;
2013-03-26 00:39:47 +00:00
var Schema = require('../').Schema;
if (!('getSchema' in global)) {
2016-04-01 11:48:17 +00:00
global.getSchema = function(connector, settings) {
2014-08-30 08:53:10 +00:00
return new Schema(connector || 'memory', settings);
2014-01-24 17:09:53 +00:00
};
2013-03-26 00:39:47 +00:00
}
2014-08-30 08:53:10 +00:00
if (!('getModelBuilder' in global)) {
2016-04-01 11:48:17 +00:00
global.getModelBuilder = function() {
2014-08-30 08:53:10 +00:00
return new ModelBuilder();
};
}