diff options
Diffstat (limited to 'node_modules/npmconf/test/certfile.js')
-rw-r--r-- | node_modules/npmconf/test/certfile.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/node_modules/npmconf/test/certfile.js b/node_modules/npmconf/test/certfile.js new file mode 100644 index 000000000..3dfb6e90f --- /dev/null +++ b/node_modules/npmconf/test/certfile.js @@ -0,0 +1,17 @@ +var test = require('tap').test +var npmconf = require('../npmconf.js') +var common = require('./00-setup.js') +var path = require('path') +var fs = require('fs') + +test('cafile loads as ca', function (t) { + var cafile = path.join(__dirname, 'fixtures', 'multi-ca') + + npmconf.load({cafile: cafile}, function (er, conf) { + if (er) throw er + + t.same(conf.get('cafile'), cafile) + t.same(conf.get('ca').join('\n'), fs.readFileSync(cafile, 'utf8').trim()) + t.end() + }) +}) |