mirror of
https://github.com/nodejs/node.git
synced 2025-05-18 22:53:45 +00:00

PR-URL: https://github.com/nodejs/node/pull/3310 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
19 lines
498 B
JavaScript
19 lines
498 B
JavaScript
require('./00-config-setup.js')
|
|
|
|
var path = require('path')
|
|
var fs = require('fs')
|
|
var test = require('tap').test
|
|
var npmconf = require('../../lib/config/core.js')
|
|
|
|
test('cafile loads as ca', function (t) {
|
|
var cafile = path.join(__dirname, '..', 'fixtures', 'config', '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()
|
|
})
|
|
})
|