nconf
nconf copied to clipboard
'overrides' doesn't override values if it's not first in hierarchy
Looks like overrides
method is just another store, not a high priority store as expected from the name.
Test https://github.com/flatiron/nconf/blob/master/test/provider-test.js#L120 passes due to provider order.
but it will fail if you'll change it as following:
"when multiple stores are used": {
topic: new nconf.Provider()
.add('file1', {type: 'file', file: files[0]})
.add('file2', {type: 'file', file: files[1]})
.overrides({foo: {bar: 'baz'}}), //moved overrides lower
"should respect the hierarchy": function(provider) {
var merged = provider.load();
helpers.assertMerged(null, merged);
assert.equal(merged.foo.bar, 'baz');
assert.equal(merged.candy.something, 'file1');
}
Store priorities will also fix #70
+1
+1
+1
same for "defaults"
+1
+1
+1
+1
+1
+1
+1