parent
963387cfd4
commit
e0e070ab28
1 changed files with 4 additions and 3 deletions
|
@ -94,19 +94,20 @@ vows.describe('nconf/stores/file').addBatch({
|
|||
tmpStore.set(key, data[key]);
|
||||
});
|
||||
|
||||
tmpStore.saveSync();
|
||||
var saved = tmpStore.saveSync();
|
||||
|
||||
fs.readFile(tmpStore.file, function (err, d) {
|
||||
fs.unlinkSync(tmpStore.file);
|
||||
|
||||
return err
|
||||
? that.callback(err)
|
||||
: that.callback(err, JSON.parse(d.toString()));
|
||||
: that.callback(err, JSON.parse(d.toString()), saved);
|
||||
});
|
||||
},
|
||||
"should save the data correctly": function (err, read) {
|
||||
"should save the data correctly": function (err, read, saved) {
|
||||
assert.isNull(err);
|
||||
assert.deepEqual(read, data);
|
||||
assert.deepEqual(read, saved);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue