From 7c8b23aa876e006faaaf61f76ba1bae41af6d213 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 14 Dec 2015 23:10:32 -0800 Subject: [PATCH] test non-file --- test.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test.js b/test.js index ace8c2e..4afd864 100644 --- a/test.js +++ b/test.js @@ -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);