nconf-lite/test/fixtures/scripts/nconf-hierarchical-defaults-merge.js
Chris Manson 608b607782 Add test for merging with defaults ()
* implementing a test for merging with defaults

* bypassing strange common tests

* trying to fix travis build in node 7

* adding node 8 to tests

* removing node 8
2017-08-15 23:37:19 -04:00

20 lines
427 B
JavaScript

var path = require('path'),
nconf = require('../../../lib/nconf');
nconf
.file('localOverrides', path.join(__dirname, '..', 'merge', 'file3.json'))
.defaults({
"candy": {
"something": "a nice default",
"something1": true,
"something2": true,
"something5": {
"first": 1,
"second": 2
}
}
});
process.stdout.write(JSON.stringify({
candy: nconf.get('candy')
}));