diff --git a/.travis.yml b/.travis.yml index 1d0ad987..c60f507f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ sudo: false language: node_js node_js: - - "4" - "6" + - "8" + - "10" diff --git a/package.json b/package.json index c9669b93..a61c3360 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "posttest": "npm run lint" }, "engines": { - "node": ">= 4 <= 6" + "node": ">=6" }, "devDependencies": { "async-iterators": "^0.2.2", diff --git a/test/loopback-dl.test.js b/test/loopback-dl.test.js index 1ab8a439..4c6653b6 100644 --- a/test/loopback-dl.test.js +++ b/test/loopback-dl.test.js @@ -1852,24 +1852,15 @@ describe('ModelBuilder processing json files', function() { customer.should.have.property('bio', undefined); // The properties are defined at prototype level - assert.equal(Object.keys(customer).filter(function(k) { + should(Object.keys(customer).filter(function(k) { // Remove internal properties return k.indexOf('__') === -1; - }).length, 0); - var count = 0; - for (var p in customer) { - if (p.indexOf('__') === 0) { - continue; - } - if (typeof customer[p] !== 'function') { - count++; - } - } - assert.equal(count, 7); // Please note there is an injected id from User prototype - assert.equal(Object.keys(customer.toObject()).filter(function(k) { + })).have.length(0); + + should(Object.keys(customer.toObject()).filter(function(k) { // Remove internal properties return k.indexOf('__') === -1; - }).length, 6); + })).have.length(6); done(null, customer); });