Skip to content

Commit

Permalink
style(lint): fixing more future lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
fishcharlie committed Feb 17, 2019
1 parent 7b604f6 commit 8da9041
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 27 deletions.
34 changes: 17 additions & 17 deletions test/Model.js
Original file line number Diff line number Diff line change
Expand Up @@ -2669,7 +2669,7 @@ describe('Model', function (){
it('Put new', function (done) {
var cats = [];

for (var i=0 ; i<10 ; ++i) {
for (var i=0 ; i<10 ; i += 1) {
cats.push(new Cats.Cat({id: 10+i, name: 'Tom_'+i}));
}

Expand All @@ -2678,7 +2678,7 @@ describe('Model', function (){
should.exist(result);
Object.getOwnPropertyNames(result.UnprocessedItems).length.should.eql(0);

for (var i=0 ; i<10 ; ++i) {
for (var i=0 ; i<10 ; i += 1) {

delete cats[i].name;
}
Expand All @@ -2695,7 +2695,7 @@ describe('Model', function (){
it('Put lots of new items', function (done) {
var cats = [];

for (var i=0 ; i<100 ; ++i) {
for (var i=0 ; i<100 ; i += 1) {
cats.push(new Cats.Cat({id: 100+i, name: 'Tom_'+i}));
}

Expand All @@ -2704,7 +2704,7 @@ describe('Model', function (){
should.exist(result);
Object.getOwnPropertyNames(result.UnprocessedItems).length.should.eql(0);

for (var i=0 ; i<100 ; ++i) {
for (var i=0 ; i<100 ; i += 1) {
delete cats[i].name;
}

Expand All @@ -2720,7 +2720,7 @@ describe('Model', function (){
it('Put new with range key', function (done) {
var cats = [];

for (var i=0 ; i<10 ; ++i) {
for (var i=0 ; i<10 ; i += 1) {
cats.push(new Cats.Cat2({ownerId: 10+i, name: 'Tom_'+i}));
}

Expand All @@ -2741,7 +2741,7 @@ describe('Model', function (){
it('Put new without range key', function (done) {
var cats = [];

for (var i=0 ; i<10 ; ++i) {
for (var i=0 ; i<10 ; i += 1) {
cats.push(new Cats.Cat2({ownerId: 10+i}));
}

Expand All @@ -2755,15 +2755,15 @@ describe('Model', function (){
it('Update items', function (done) {
var cats = [];

for (var i=0 ; i<10 ; ++i) {
for (var i=0 ; i<10 ; i += 1) {
cats.push(new Cats.Cat({id: 20+i, name: 'Tom_'+i}));
}

Cats.Cat.batchPut(cats, function (err, result) {
should.not.exist(err);
should.exist(result);

for (var i=0 ; i<10 ; ++i) {
for (var i=0 ; i<10 ; i += 1) {
var cat = cats[i];
cat.name = 'John_' + (cat.id + 100);
}
Expand All @@ -2773,7 +2773,7 @@ describe('Model', function (){
should.exist(result2);
Object.getOwnPropertyNames(result2.UnprocessedItems).length.should.eql(0);

for (var i=0 ; i<10 ; ++i) {
for (var i=0 ; i<10 ; i += 1) {
delete cats[i].name;
}

Expand All @@ -2790,15 +2790,15 @@ describe('Model', function (){
it('Update with range key', function (done) {
var cats = [];

for (var i=0 ; i<10 ; ++i) {
for (var i=0 ; i<10 ; i += 1) {
cats.push(new Cats.Cat2({ownerId: 20+i, name: 'Tom_'+i}));
}

Cats.Cat2.batchPut(cats, function (err, result) {
should.not.exist(err);
should.exist(result);

for (var i=0 ; i<10 ; ++i) {
for (var i=0 ; i<10 ; i += 1) {
var cat = cats[i];
cat.name = 'John_' + (cat.ownerId + 100);
}
Expand All @@ -2821,15 +2821,15 @@ describe('Model', function (){
it('Update without range key', function (done) {
var cats = [];

for (var i=0 ; i<10 ; ++i) {
for (var i=0 ; i<10 ; i += 1) {
cats.push(new Cats.Cat2({ownerId: 20+i, name: 'Tom_'+i}));
}

Cats.Cat2.batchPut(cats, function (err, result) {
should.not.exist(err);
should.exist(result);

for (var i=0 ; i<10 ; ++i) {
for (var i=0 ; i<10 ; i += 1) {
cats[i].name = null;
}

Expand Down Expand Up @@ -3102,7 +3102,7 @@ describe('Model', function (){
it('Simple delete', function (done) {
var cats = [];

for (var i=0 ; i<10 ; ++i) {
for (var i=0 ; i<10 ; i += 1) {
cats.push(new Cats.Cat({id: 30+i, name: 'Tom_'+i}));
}

Expand All @@ -3128,7 +3128,7 @@ describe('Model', function (){
it('Delete with range key', function (done) {
var cats = [];

for (var i=0 ; i<10 ; ++i) {
for (var i=0 ; i<10 ; i += 1) {
cats.push(new Cats.Cat2({ownerId: 30+i, name: 'Tom_'+i}));
}

Expand All @@ -3154,15 +3154,15 @@ describe('Model', function (){
it('Delete without range key', function (done) {
var cats = [];

for (var i=0 ; i<10 ; ++i) {
for (var i=0 ; i<10 ; i += 1) {
cats.push(new Cats.Cat2({ownerId: 30+i, name: 'Tom_'+i}));
}

Cats.Cat2.batchPut(cats, function (err, result) {
should.not.exist(err);
should.exist(result);

for (var i=0 ; i<10 ; ++i) {
for (var i=0 ; i<10 ; i += 1) {
delete cats[i].name;
}

Expand Down
18 changes: 9 additions & 9 deletions test/Plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe('Plugin', function() {

Model.plugin(function(obj) {
obj.on('plugin:register', function() {
counter++;
counter += 1;
});
});

Expand All @@ -93,7 +93,7 @@ describe('Plugin', function() {

Model.plugin(function(obj) {
obj.on('plugin:register', function() {
counter++;
counter += 1;
});
});

Expand Down Expand Up @@ -156,7 +156,7 @@ describe('Plugin', function() {

Model.plugin(function(obj) {
obj.on('*', function () {
counter++;
counter += 1;
});
});

Expand All @@ -170,7 +170,7 @@ describe('Plugin', function() {

Model.plugin(function(obj) {
obj.on(function () {
counter++;
counter += 1;
});
});

Expand All @@ -185,7 +185,7 @@ describe('Plugin', function() {
var pluginB = function(plugin) {
plugin.setName('Plugin B');
plugin.on('plugin', 'init', function () {
counter++;
counter += 1;
});
};

Expand All @@ -211,7 +211,7 @@ describe('Plugin', function() {
var pluginA = function(plugin) {
plugin.setName('Plugin A');
plugin.on('model:scan', function () {
counter++;
counter += 1;
});
};

Expand Down Expand Up @@ -329,7 +329,7 @@ describe('Plugin', function() {
var pluginA = function(plugin) {
plugin.setName('Plugin A');
plugin.on('model:query', function () {
counter++;
counter += 1;
});
};

Expand Down Expand Up @@ -447,7 +447,7 @@ describe('Plugin', function() {
var pluginA = function(plugin) {
plugin.setName('Plugin A');
plugin.on('model:get', function () {
counter++;
counter += 1;
});
};

Expand Down Expand Up @@ -565,7 +565,7 @@ describe('Plugin', function() {
var pluginA = function(plugin) {
plugin.setName('Plugin A');
plugin.on('model:put', function () {
counter++;
counter += 1;
});
};

Expand Down
2 changes: 1 addition & 1 deletion test/Scan.js
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ describe('Scan', function (){
},
});

for (let i = 0; i < 10; i++) {
for (let i = 0; i < 10; i += 1) {
const record = {
id: `${i}`,
};
Expand Down

0 comments on commit 8da9041

Please sign in to comment.