Fix using arrow function and const

This commit is contained in:
jos 2019-07-28 11:45:43 +02:00
parent eff2fe85a0
commit 14cdd0e61b
2 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ History.prototype._calculateHistorySize = function () {
var calculateItemSize = this.calculateItemSize; var calculateItemSize = this.calculateItemSize;
var totalSize = 0; var totalSize = 0;
this.items.forEach(item => { this.items.forEach(function (item) {
totalSize += calculateItemSize(item); totalSize += calculateItemSize(item);
}); });

View File

@ -93,7 +93,7 @@ describe('util', function () {
}); });
it('should strip MongoDB data types', function () { it('should strip MongoDB data types', function () {
const mongoDocument = '{\n' + var mongoDocument = '{\n' +
' "_id" : ObjectId("123"),\n' + ' "_id" : ObjectId("123"),\n' +
' "isoDate" : ISODate("2012-12-19T06:01:17.171Z"),\n' + ' "isoDate" : ISODate("2012-12-19T06:01:17.171Z"),\n' +
' "regularNumber" : 67,\n' + ' "regularNumber" : 67,\n' +
@ -105,7 +105,7 @@ describe('util', function () {
' "decimal2" : NumberDecimal(4)\n' + ' "decimal2" : NumberDecimal(4)\n' +
'}'; '}';
const expectedJson = '{\n' + var expectedJson = '{\n' +
' "_id" : "123",\n' + ' "_id" : "123",\n' +
' "isoDate" : "2012-12-19T06:01:17.171Z",\n' + ' "isoDate" : "2012-12-19T06:01:17.171Z",\n' +
' "regularNumber" : 67,\n' + ' "regularNumber" : 67,\n' +