test non-file

This commit is contained in:
AJ ONeal 2015-12-14 23:10:32 -08:00
parent 7acb9f196e
commit 7c8b23aa87
1 changed files with 6 additions and 0 deletions

View File

@ -2,6 +2,12 @@
//var pyconf = require('pyconf');
var pyconf = require('./');
pyconf.readFile('doesnt-exist.conf', function (err, obj) {
if (!err || obj) {
console.error("didn't get an error (or also got an object) when testing on non-existant file");
process.exit(1);
}
});
pyconf.readFile('example.conf', function (err, obj) {
if (err) {
console.error(err.stack);