Skip to content

Commit de70d74

Browse files
authored
Merge pull request #1183 from strongloop/fix/eslint-errors-2x
Back-port fixes for linter errors from master
2 parents a1b9b42 + f8da978 commit de70d74

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

examples/datasource-app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Article.create(function(e, article) {
106106
// should be able to attach a data source to an existing model
107107
var modelBuilder = new ModelBuilder();
108108

109-
Color = modelBuilder.define('Color', {
109+
var Color = modelBuilder.define('Color', {
110110
name: String,
111111
});
112112

lib/connectors/memory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ Memory.prototype.replaceOrCreate = function(model, data, options, callback) {
813813
// Calling _createSync to update the collection in a sync way and
814814
// to guarantee to create it in the same turn of even loop
815815
return self._createSync(model, data, function(err, id) {
816-
if (err) return process.nextTick(function() { cb(err); });
816+
if (err) return process.nextTick(function() { callback(err); });
817817
self.saveToFile(id, function(err, id) {
818818
self.setIdValue(model, data, id);
819819
callback(err, self.fromDb(model, data), {isNewInstance: true});

test/manipulation.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ describe('manipulation', function() {
417417
.catch(done);
418418
});
419419

420-
it('should save throw error on validation', function() {
420+
it('should save throw error on validation', function(done) {
421421
Person.findOne(function(err, p) {
422422
should.not.exist(err);
423423
p.isValid = function(cb) {
@@ -429,6 +429,7 @@ describe('manipulation', function() {
429429
'throws': true,
430430
});
431431
}).should.throw(ValidationError);
432+
done();
432433
});
433434
});
434435

test/persistence-hooks.suite.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,7 +1446,7 @@ module.exports = function(dataSource, should, connectorCapabilities) {
14461446
});
14471447
});
14481448

1449-
if (!getSchema().connector.replaceById) {
1449+
if (!dataSource.connector.replaceById) {
14501450
describe.skip('replaceById - not implemented', function() {});
14511451
} else {
14521452
describe('PersistedModel.prototype.replaceAttributes', function() {
@@ -2103,7 +2103,7 @@ module.exports = function(dataSource, should, connectorCapabilities) {
21032103
});
21042104
});
21052105

2106-
if (!getSchema().connector.replaceById) {
2106+
if (!dataSource.connector.replaceById) {
21072107
describe.skip('replaceById - not implemented', function() {});
21082108
} else {
21092109
describe('PersistedModel.replaceOrCreate', function() {

0 commit comments

Comments
 (0)