diff --git a/test/fixtures/hierarchy/user.json b/test/fixtures/hierarchy/user.json index 45a3aac..ac5c090 100644 --- a/test/fixtures/hierarchy/user.json +++ b/test/fixtures/hierarchy/user.json @@ -1,4 +1,5 @@ { "title": "My specific title", - "color": "green" + "color": "green", + "weebls": "crap" } \ No newline at end of file diff --git a/test/hierarchy-test.js b/test/hierarchy-test.js index 80e11e9..635df4d 100644 --- a/test/hierarchy-test.js +++ b/test/hierarchy-test.js @@ -20,8 +20,8 @@ vows.describe('nconf/hierarchy').addBatch({ "When using nconf": { "configured with two file stores": { topic: function () { - nconf.add('user', { type: 'file', file: userConfig }); nconf.add('global', { type: 'file', file: globalConfig }); + nconf.add('user', { type: 'file', file: userConfig }); nconf.load(); return nconf; }, @@ -98,12 +98,12 @@ vows.describe('nconf/hierarchy').addBatch({ assert.deepEqual(JSON.parse(data), { apples: true, candy: { - something: 'foo', + something: 'file1', something1: true, something2: true, something5: { first: 1, - second: 'bar' + second: 2 } } }); diff --git a/test/nconf-test.js b/test/nconf-test.js index 95a3904..39b6227 100644 --- a/test/nconf-test.js +++ b/test/nconf-test.js @@ -107,22 +107,24 @@ vows.describe('nconf').addBatch({ "without a callback": { "should respond with the merged store": function () { assert.deepEqual(nconf.load(), { - title: 'My specific title', - color: 'green', - movie: 'Kill Bill' + title: 'My generic title', + color: 'red', + weebls: 'crap', + movie: 'Kill Bill' }); } }, "with a callback": { topic: function () { - nconf.load(this.callback.bind(null, null)); + nconf.load(this.callback.bind(null, null)); }, "should respond with the merged store": function (ign, err, store) { assert.isNull(err); assert.deepEqual(store, { - title: 'My specific title', - color: 'green', - movie: 'Kill Bill' + title: 'My generic title', + color: 'red', + weebls: 'crap', + movie: 'Kill Bill' }); } }