Merge pull request #119 from strongloop/feature/export-validation-error

Add ValidationError to loopback exports.
This commit is contained in:
Miroslav Bajtoš 2014-01-06 09:52:12 -08:00
commit 6ea8ad20fd
2 changed files with 9 additions and 0 deletions

View File

@ -3,6 +3,7 @@
*/
var loopback = module.exports = require('./lib/loopback');
var datasourceJuggler = require('loopback-datasource-juggler');
/**
* Connectors
@ -17,3 +18,4 @@ loopback.Mail = require('./lib/connectors/mail');
*/
loopback.GeoPoint = require('loopback-datasource-juggler/lib/geo').GeoPoint;
loopback.ValidationError = datasourceJuggler.ValidationError;

View File

@ -1,4 +1,11 @@
describe('loopback', function() {
describe('exports', function() {
it('ValidationError', function() {
expect(loopback.ValidationError).to.be.a('function')
.and.have.property('name', 'ValidationError');
});
});
describe('loopback.createDataSource(options)', function(){
it('Create a data source with a connector.', function() {
var dataSource = loopback.createDataSource({