1 var test = require('tap').test
3 require('./lib/server.js').close()
4 var common = require('./lib/common.js')
7 http: 'http://proxy.npm:8088/',
8 https: 'https://proxy.npm:8043/',
9 localAddress: 'localhost.localdomain'
12 ca: 'not including a PEM',
13 certificate: 'still not including a PEM',
23 userAgent: 'npm-awesome/4 (Mozilla 5.0)',
24 log: { fake: function () {} },
26 couchToken: { object: true },
27 sessionToken: 'hamchunx'
30 test('config defaults', function (t) {
31 var client = common.freshClient(config)
33 var proxy = client.config.proxy
34 t.equal(proxy.http, 'http://proxy.npm:8088/')
35 t.equal(proxy.https, 'https://proxy.npm:8043/')
36 t.equal(proxy.localAddress, 'localhost.localdomain')
38 var ssl = client.config.ssl
39 t.equal(ssl.ca, 'not including a PEM')
40 t.equal(ssl.certificate, 'still not including a PEM')
41 t.equal(ssl.key, 'nope')
42 t.equal(ssl.strict, false)
44 var retry = client.config.retry
45 t.equal(retry.count, 1)
46 t.equal(retry.factor, 9001)
47 t.equal(retry.minTimeout, -1)
48 t.equal(retry.maxTimeout, Infinity)
50 t.equal(client.config.userAgent, 'npm-awesome/4 (Mozilla 5.0)')
52 t.equal(client.config.defaultTag, 'next')
53 t.ok(client.config.couchToken.object)
54 t.equal(client.config.sessionToken, 'hamchunx')