[dist fix] Cleanup some whitespace.
This commit is contained in:
parent
09342555ba
commit
af0e9fb7e7
34 changed files with 62 additions and 65 deletions
4
LICENSE
4
LICENSE
|
@ -1,4 +1,4 @@
|
||||||
Copyright (c) 2011 Nodejitsu Inc.
|
Copyright (C) 2011 Charlie Robbins and the Contributors.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* nconf.js: Top-level include for the nconf module
|
* nconf.js: Top-level include for the nconf module
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* utils.js: Utility functions for the nconf module.
|
* utils.js: Utility functions for the nconf module.
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* formats.js: Default formats supported by nconf
|
* formats.js: Default formats supported by nconf
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* provider.js: Abstraction providing an interface into pluggable configuration storage.
|
* provider.js: Abstraction providing an interface into pluggable configuration storage.
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* argv.js: Simple memory-based store for command-line arguments.
|
* argv.js: Simple memory-based store for command-line arguments.
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* env.js: Simple memory-based store for environment variables
|
* env.js: Simple memory-based store for environment variables
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* file.js: Simple file storage engine for nconf files
|
* file.js: Simple file storage engine for nconf files
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* literal.js: Simple literal Object store for nconf.
|
* literal.js: Simple literal Object store for nconf.
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* memory.js: Simple memory storage engine for nconf configuration(s)
|
* memory.js: Simple memory storage engine for nconf configuration(s)
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ Memory.prototype.get = function (key) {
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
return target;
|
return target;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,7 @@
|
||||||
"name": "nconf",
|
"name": "nconf",
|
||||||
"description": "Hierarchical node.js configuration with files, environment variables, command-line arguments, and atomic object merging.",
|
"description": "Hierarchical node.js configuration with files, environment variables, command-line arguments, and atomic object merging.",
|
||||||
"version": "0.6.9",
|
"version": "0.6.9",
|
||||||
"author": "Nodejitsu Inc. <info@nodejitsu.com>",
|
"author": "Charlie Robbins <charlie.robbins@gmail.com>",
|
||||||
"maintainers": [
|
|
||||||
"indexzero <charlie@nodejitsu.com>"
|
|
||||||
],
|
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "http://github.com/flatiron/nconf.git"
|
"url": "http://github.com/flatiron/nconf.git"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* common.js: Tests for common utility function in nconf.
|
* common.js: Tests for common utility function in nconf.
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* complete-test.js: Complete test for multiple stores.
|
* complete-test.js: Complete test for multiple stores.
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
6
test/fixtures/data.js
vendored
6
test/fixtures/data.js
vendored
|
@ -1,13 +1,13 @@
|
||||||
/*
|
/*
|
||||||
* data.js: Simple data fixture for configuration test.
|
* data.js: Simple data fixture for configuration test.
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
exports.data = {
|
exports.data = {
|
||||||
isNull: null,
|
isNull: null,
|
||||||
literal: 'bazz',
|
literal: 'bazz',
|
||||||
arr: ['one', 2, true, { value: 'foo' }],
|
arr: ['one', 2, true, { value: 'foo' }],
|
||||||
obj: {
|
obj: {
|
||||||
host: 'localhost',
|
host: 'localhost',
|
||||||
|
|
4
test/fixtures/scripts/nconf-argv.js
vendored
4
test/fixtures/scripts/nconf-argv.js
vendored
|
@ -1,10 +1,10 @@
|
||||||
/*
|
/*
|
||||||
* default-argv.js: Test fixture for using optimist defaults with nconf.
|
* default-argv.js: Test fixture for using optimist defaults with nconf.
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var nconf = require('../../../lib/nconf').argv().env();
|
var nconf = require('../../../lib/nconf').argv().env();
|
||||||
|
|
||||||
process.stdout.write(nconf.get('something'));
|
process.stdout.write(nconf.get('something'));
|
4
test/fixtures/scripts/nconf-change-argv.js
vendored
4
test/fixtures/scripts/nconf-change-argv.js
vendored
|
@ -1,10 +1,10 @@
|
||||||
/*
|
/*
|
||||||
* nconf-change-argv.js: Test fixture for changing argv on the fly
|
* nconf-change-argv.js: Test fixture for changing argv on the fly
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var nconf = require('../../../lib/nconf').argv();
|
var nconf = require('../../../lib/nconf').argv();
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
4
test/fixtures/scripts/nconf-env.js
vendored
4
test/fixtures/scripts/nconf-env.js
vendored
|
@ -1,10 +1,10 @@
|
||||||
/*
|
/*
|
||||||
* nconf-env.js: Test fixture for using process.env defaults with nconf.
|
* nconf-env.js: Test fixture for using process.env defaults with nconf.
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var nconf = require('../../../lib/nconf').env();
|
var nconf = require('../../../lib/nconf').env();
|
||||||
|
|
||||||
process.stdout.write(nconf.get('SOMETHING'));
|
process.stdout.write(nconf.get('SOMETHING'));
|
|
@ -1,11 +1,11 @@
|
||||||
/*
|
/*
|
||||||
* nconf-hierarchical-file-argv.js: Test fixture for using optimist defaults and a file store with nconf.
|
* nconf-hierarchical-file-argv.js: Test fixture for using optimist defaults and a file store with nconf.
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
* (C) 2011, Sander Tolsma
|
* (C) 2011, Sander Tolsma
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var path = require('path'),
|
var path = require('path'),
|
||||||
nconf = require('../../../lib/nconf');
|
nconf = require('../../../lib/nconf');
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
/*
|
/*
|
||||||
* nconf-hierarchical-load-merge.js: Test fixture for loading and merging nested objects across stores.
|
* nconf-hierarchical-load-merge.js: Test fixture for loading and merging nested objects across stores.
|
||||||
*
|
*
|
||||||
* (C) 2012, Nodejitsu Inc.
|
* (C) 2012, Charlie Robbins and the Contributors.
|
||||||
* (C) 2012, Michael Hart
|
* (C) 2012, Michael Hart
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var path = require('path'),
|
var path = require('path'),
|
||||||
nconf = require('../../../lib/nconf');
|
nconf = require('../../../lib/nconf');
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
/*
|
/*
|
||||||
* nconf-hierarchical-load-save.js: Test fixture for using optimist, envvars and a file store with nconf.
|
* nconf-hierarchical-load-save.js: Test fixture for using optimist, envvars and a file store with nconf.
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var fs = require('fs'),
|
var fs = require('fs'),
|
||||||
path = require('path'),
|
path = require('path'),
|
||||||
nconf = require('../../../lib/nconf');
|
nconf = require('../../../lib/nconf');
|
||||||
|
|
||||||
//
|
//
|
||||||
// Setup nconf to use (in-order):
|
// Setup nconf to use (in-order):
|
||||||
// 1. Command-line arguments
|
// 1. Command-line arguments
|
||||||
// 2. Environment variables
|
// 2. Environment variables
|
||||||
// 3. A file located at 'path/to/config.json'
|
// 3. A file located at 'path/to/config.json'
|
||||||
|
|
4
test/fixtures/scripts/nconf-nested-env.js
vendored
4
test/fixtures/scripts/nconf-nested-env.js
vendored
|
@ -1,11 +1,11 @@
|
||||||
/*
|
/*
|
||||||
* nconf-nested-env.js: Test fixture for env with nested keys.
|
* nconf-nested-env.js: Test fixture for env with nested keys.
|
||||||
*
|
*
|
||||||
* (C) 2012, Nodejitsu Inc.
|
* (C) 2012, Charlie Robbins and the Contributors.
|
||||||
* (C) 2012, Michael Hart
|
* (C) 2012, Michael Hart
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var nconf = require('../../../lib/nconf').env('_');
|
var nconf = require('../../../lib/nconf').env('_');
|
||||||
|
|
||||||
process.stdout.write(nconf.get('SOME:THING'));
|
process.stdout.write(nconf.get('SOME:THING'));
|
||||||
|
|
4
test/fixtures/scripts/provider-argv.js
vendored
4
test/fixtures/scripts/provider-argv.js
vendored
|
@ -1,10 +1,10 @@
|
||||||
/*
|
/*
|
||||||
* provider-argv.js: Test fixture for using optimist defaults with nconf.
|
* provider-argv.js: Test fixture for using optimist defaults with nconf.
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var nconf = require('../../../lib/nconf');
|
var nconf = require('../../../lib/nconf');
|
||||||
|
|
||||||
var provider = new (nconf.Provider)().argv();
|
var provider = new (nconf.Provider)().argv();
|
||||||
|
|
4
test/fixtures/scripts/provider-env.js
vendored
4
test/fixtures/scripts/provider-env.js
vendored
|
@ -1,10 +1,10 @@
|
||||||
/*
|
/*
|
||||||
* provider-argv.js: Test fixture for using process.env defaults with nconf.
|
* provider-argv.js: Test fixture for using process.env defaults with nconf.
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var nconf = require('../../../lib/nconf');
|
var nconf = require('../../../lib/nconf');
|
||||||
|
|
||||||
var provider = new (nconf.Provider)().env();
|
var provider = new (nconf.Provider)().env();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* helpers.js: Test helpers for nconf.
|
* helpers.js: Test helpers for nconf.
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* hierarchy-test.js: Basic tests for hierarchical file stores.
|
* hierarchy-test.js: Basic tests for hierarchical file stores.
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -52,16 +52,16 @@ vows.describe('nconf/hierarchy').addBatch({
|
||||||
that = this,
|
that = this,
|
||||||
data = '',
|
data = '',
|
||||||
child;
|
child;
|
||||||
|
|
||||||
try { fs.unlinkSync(configFile) }
|
try { fs.unlinkSync(configFile) }
|
||||||
catch (ex) { }
|
catch (ex) { }
|
||||||
|
|
||||||
child = spawn('node', [script].concat(argv));
|
child = spawn('node', [script].concat(argv));
|
||||||
|
|
||||||
child.stdout.on('data', function (d) {
|
child.stdout.on('data', function (d) {
|
||||||
data += d;
|
data += d;
|
||||||
});
|
});
|
||||||
|
|
||||||
child.on('exit', function () {
|
child.on('exit', function () {
|
||||||
fs.readFile(configFile, 'utf8', that.callback.bind(null, null, data));
|
fs.readFile(configFile, 'utf8', that.callback.bind(null, null, data));
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* mock-store.js: Mock store for ensuring certain operations are actually called.
|
* mock-store.js: Mock store for ensuring certain operations are actually called.
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -28,9 +28,9 @@ Mock.prototype.save = function (value, callback) {
|
||||||
callback = value;
|
callback = value;
|
||||||
value = null;
|
value = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
self.emit('save');
|
self.emit('save');
|
||||||
callback();
|
callback();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* file-store-test.js: Tests for the nconf File store.
|
* file-store-test.js: Tests for the nconf File store.
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
/*
|
/*
|
||||||
* provider-save-test.js: Ensures consistency for Provider `save` operations.
|
* provider-save-test.js: Ensures consistency for Provider `save` operations.
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var assert = require('assert'),
|
var assert = require('assert'),
|
||||||
vows = require('vows'),
|
vows = require('vows'),
|
||||||
nconf = require('../lib/nconf');
|
nconf = require('../lib/nconf');
|
||||||
|
|
||||||
//
|
//
|
||||||
// Expose `nconf.Mock`
|
// Expose `nconf.Mock`
|
||||||
//
|
//
|
||||||
require('./mocks/mock-store');
|
require('./mocks/mock-store');
|
||||||
|
|
||||||
vows.describe('nconf/provider/save').addBatch({
|
vows.describe('nconf/provider/save').addBatch({
|
||||||
"When using nconf": {
|
"When using nconf": {
|
||||||
"an instance of 'nconf.Provider'": {
|
"an instance of 'nconf.Provider'": {
|
||||||
|
@ -25,7 +25,7 @@ vows.describe('nconf/provider/save').addBatch({
|
||||||
topic: function () {
|
topic: function () {
|
||||||
var mock = nconf.stores.mock,
|
var mock = nconf.stores.mock,
|
||||||
that = this;
|
that = this;
|
||||||
|
|
||||||
mock.on('save', function () { that.saved = true });
|
mock.on('save', function () { that.saved = true });
|
||||||
nconf.save(this.callback);
|
nconf.save(this.callback);
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* provider-test.js: Tests for the nconf Provider object.
|
* provider-test.js: Tests for the nconf Provider object.
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* argv-test.js: Tests for the nconf argv store.
|
* argv-test.js: Tests for the nconf argv store.
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* env-test.js: Tests for the nconf env store.
|
* env-test.js: Tests for the nconf env store.
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* file-store-test.js: Tests for the nconf File store.
|
* file-store-test.js: Tests for the nconf File store.
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -109,11 +109,11 @@ vows.describe('nconf/stores/file').addBatch({
|
||||||
"the save() method": {
|
"the save() method": {
|
||||||
topic: function (tmpStore) {
|
topic: function (tmpStore) {
|
||||||
var that = this;
|
var that = this;
|
||||||
|
|
||||||
Object.keys(data).forEach(function (key) {
|
Object.keys(data).forEach(function (key) {
|
||||||
tmpStore.set(key, data[key]);
|
tmpStore.set(key, data[key]);
|
||||||
});
|
});
|
||||||
|
|
||||||
tmpStore.save(function () {
|
tmpStore.save(function () {
|
||||||
fs.readFile(tmpStore.file, function (err, d) {
|
fs.readFile(tmpStore.file, function (err, d) {
|
||||||
fs.unlinkSync(tmpStore.file);
|
fs.unlinkSync(tmpStore.file);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* literal-test.js: Tests for the nconf literal store.
|
* literal-test.js: Tests for the nconf literal store.
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* memory-store-test.js: Tests for the nconf Memory store.
|
* memory-store-test.js: Tests for the nconf Memory store.
|
||||||
*
|
*
|
||||||
* (C) 2011, Nodejitsu Inc.
|
* (C) 2011, Charlie Robbins and the Contributors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ vows.describe('nconf/stores/memory').addBatch({
|
||||||
},
|
},
|
||||||
"when merging into an existing Object value": function (store) {
|
"when merging into an existing Object value": function (store) {
|
||||||
store.set('merge:object', {
|
store.set('merge:object', {
|
||||||
prop1: 2,
|
prop1: 2,
|
||||||
prop2: 'prop2',
|
prop2: 'prop2',
|
||||||
prop3: {
|
prop3: {
|
||||||
bazz: 'bazz'
|
bazz: 'bazz'
|
||||||
|
@ -101,7 +101,7 @@ vows.describe('nconf/stores/memory').addBatch({
|
||||||
bar: 'foo',
|
bar: 'foo',
|
||||||
bazz: 'bazz'
|
bazz: 'bazz'
|
||||||
});
|
});
|
||||||
assert.equal(store.get('merge:object:prop4').length, 2);
|
assert.equal(store.get('merge:object:prop4').length, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue