Merge pull request #1183 from strongloop/fix/eslint-errors-2x
Back-port fixes for linter errors from master
This commit is contained in:
commit
de70d746e8
|
@ -106,7 +106,7 @@ Article.create(function(e, article) {
|
|||
// should be able to attach a data source to an existing model
|
||||
var modelBuilder = new ModelBuilder();
|
||||
|
||||
Color = modelBuilder.define('Color', {
|
||||
var Color = modelBuilder.define('Color', {
|
||||
name: String,
|
||||
});
|
||||
|
||||
|
|
|
@ -813,7 +813,7 @@ Memory.prototype.replaceOrCreate = function(model, data, options, callback) {
|
|||
// Calling _createSync to update the collection in a sync way and
|
||||
// to guarantee to create it in the same turn of even loop
|
||||
return self._createSync(model, data, function(err, id) {
|
||||
if (err) return process.nextTick(function() { cb(err); });
|
||||
if (err) return process.nextTick(function() { callback(err); });
|
||||
self.saveToFile(id, function(err, id) {
|
||||
self.setIdValue(model, data, id);
|
||||
callback(err, self.fromDb(model, data), {isNewInstance: true});
|
||||
|
|
|
@ -417,7 +417,7 @@ describe('manipulation', function() {
|
|||
.catch(done);
|
||||
});
|
||||
|
||||
it('should save throw error on validation', function() {
|
||||
it('should save throw error on validation', function(done) {
|
||||
Person.findOne(function(err, p) {
|
||||
should.not.exist(err);
|
||||
p.isValid = function(cb) {
|
||||
|
@ -429,6 +429,7 @@ describe('manipulation', function() {
|
|||
'throws': true,
|
||||
});
|
||||
}).should.throw(ValidationError);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -1446,7 +1446,7 @@ module.exports = function(dataSource, should, connectorCapabilities) {
|
|||
});
|
||||
});
|
||||
|
||||
if (!getSchema().connector.replaceById) {
|
||||
if (!dataSource.connector.replaceById) {
|
||||
describe.skip('replaceById - not implemented', function() {});
|
||||
} else {
|
||||
describe('PersistedModel.prototype.replaceAttributes', function() {
|
||||
|
@ -2103,7 +2103,7 @@ module.exports = function(dataSource, should, connectorCapabilities) {
|
|||
});
|
||||
});
|
||||
|
||||
if (!getSchema().connector.replaceById) {
|
||||
if (!dataSource.connector.replaceById) {
|
||||
describe.skip('replaceById - not implemented', function() {});
|
||||
} else {
|
||||
describe('PersistedModel.replaceOrCreate', function() {
|
||||
|
|
Loading…
Reference in New Issue