Sha256: c30a4418fe79a0fcec0e154191e4a86fc995949c3cf9310321c8a4cce703942b

Contents?: true

Size: 541 Bytes

Versions: 5

Compression:

Stored size: 541 Bytes

Contents

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)
    var ca = fs.readFileSync(cafile, 'utf8').trim()
    t.same(conf.get('ca').join(ca.match(/\r/g) ? '\r\n' : '\n'), ca)
    t.end()
  })
})

Version data entries

5 entries across 4 versions & 1 rubygems

Version Path
node-compiler-0.9.1 vendor/node/deps/npm/test/tap/config-certfile.js
node-compiler-0.9.0 vendor/node-v7.2.1/deps/npm/test/tap/config-certfile.js
node-compiler-0.8.0 vendor/node-v7.2.0/deps/npm/test/tap/config-certfile.js
node-compiler-0.7.0 vendor/node-v6.9.1/deps/npm/test/tap/config-certfile.js
node-compiler-0.7.0 vendor/node-v7.1.0/deps/npm/test/tap/config-certfile.js