Add support for Node.js 8.x and 10.x, drop 4.x
Also remove a flaky test assertion that reports different results on different Node.js versions. This assertion has been already removed on `master` branch (3.x version line).
This commit is contained in:
parent
9917e1d283
commit
b056255ecd
|
@ -1,5 +1,6 @@
|
||||||
sudo: false
|
sudo: false
|
||||||
language: node_js
|
language: node_js
|
||||||
node_js:
|
node_js:
|
||||||
- "4"
|
|
||||||
- "6"
|
- "6"
|
||||||
|
- "8"
|
||||||
|
- "10"
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
"posttest": "npm run lint"
|
"posttest": "npm run lint"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 4 <= 6"
|
"node": ">=6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"async-iterators": "^0.2.2",
|
"async-iterators": "^0.2.2",
|
||||||
|
|
|
@ -1852,24 +1852,15 @@ describe('ModelBuilder processing json files', function() {
|
||||||
customer.should.have.property('bio', undefined);
|
customer.should.have.property('bio', undefined);
|
||||||
|
|
||||||
// The properties are defined at prototype level
|
// 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
|
// Remove internal properties
|
||||||
return k.indexOf('__') === -1;
|
return k.indexOf('__') === -1;
|
||||||
}).length, 0);
|
})).have.length(0);
|
||||||
var count = 0;
|
|
||||||
for (var p in customer) {
|
should(Object.keys(customer.toObject()).filter(function(k) {
|
||||||
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) {
|
|
||||||
// Remove internal properties
|
// Remove internal properties
|
||||||
return k.indexOf('__') === -1;
|
return k.indexOf('__') === -1;
|
||||||
}).length, 6);
|
})).have.length(6);
|
||||||
|
|
||||||
done(null, customer);
|
done(null, customer);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue