1 | var test = require('tap').test
|
2 | var npmconf = require('../npmconf.js')
|
3 | var common = require('./00-setup.js')
|
4 | var path = require('path')
|
5 | var fs = require('fs')
|
6 |
|
7 | test('cafile loads as ca', function (t) {
|
8 | var cafile = path.join(__dirname, 'fixtures', 'multi-ca')
|
9 |
|
10 | npmconf.load({cafile: cafile}, function (er, conf) {
|
11 | if (er) throw er
|
12 |
|
13 | t.same(conf.get('cafile'), cafile)
|
14 | t.same(conf.get('ca').join('\n'), fs.readFileSync(cafile, 'utf8').trim())
|
15 | t.end()
|
16 | })
|
17 | })
|