nconf-lite/test/fixtures/scripts/nconf-hierarchical-load-merge-with-separator.js
Adrien Becchis e5db2ef6d7 Argv store separator (#291)
* argv store now accept a separator argument to create nested values

* remove stub file that shouldnt have been commited

* write a test to ensure separator is working well and use delete rather than undefined assign
2017-11-04 21:30:14 -04:00

19 lines
479 B
JavaScript

/*
* nconf-hierarchical-load-merge.js: Test fixture for loading and merging nested objects across stores.
*
* (C) 2012, Charlie Robbins and the Contributors.
* (C) 2012, Michael Hart
*
*/
var path = require('path'),
nconf = require('../../../lib/nconf');
nconf.argv({separator: '--'})
.env('__')
.file(path.join(__dirname, '..', 'merge', 'file1.json'));
process.stdout.write(JSON.stringify({
apples: nconf.get('apples'),
candy: nconf.get('candy')
}));