Merge pull request #116 from Blooie/master

fixing the tests
This commit is contained in:
Charlie Robbins 2014-09-24 23:00:07 -04:00
commit 1602a9e1a3
3 changed files with 14 additions and 11 deletions

View file

@ -1,4 +1,5 @@
{
"title": "My specific title",
"color": "green"
"color": "green",
"weebls": "crap"
}

View file

@ -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
}
}
});

View file

@ -107,8 +107,9 @@ vows.describe('nconf').addBatch({
"without a callback": {
"should respond with the merged store": function () {
assert.deepEqual(nconf.load(), {
title: 'My specific title',
color: 'green',
title: 'My generic title',
color: 'red',
weebls: 'crap',
movie: 'Kill Bill'
});
}
@ -120,8 +121,9 @@ vows.describe('nconf').addBatch({
"should respond with the merged store": function (ign, err, store) {
assert.isNull(err);
assert.deepEqual(store, {
title: 'My specific title',
color: 'green',
title: 'My generic title',
color: 'red',
weebls: 'crap',
movie: 'Kill Bill'
});
}