1 var test = require('tap').test
2 var npmconf = require('../npmconf.js')
3 var common = require('./00-setup.js')
6 { globalconfig: common.globalconfig,
9 'init.author.name': 'Isaac Z. Schlueter',
10 'init.author.email': 'i@izs.me',
11 'init.author.url': 'http://blog.izs.me/',
12 'proprietary-attribs': false,
13 'npm:publishtest': true,
14 '_npmjs.org:couch': 'https://admin:password@localhost:5984/registry',
15 _auth: 'dXNlcm5hbWU6cGFzc3dvcmQ=',
16 'npm-www:nocache': '1',
17 nodedir: '/Users/isaacs/dev/js/node-v0.8',
21 'tmp': process.env.HOME + '/.tmp',
22 username : "username",
23 _password : "password",
25 { AuthSession: 'yabba-dabba-doodle',
27 expires: '1345001053415',
31 var envData = { userconfig: common.userconfig, 'other-env-thing': '1000' }
33 var gcData = { 'package-config:foo': 'boo' }
35 var biData = { 'builtin-config': true }
37 var cli = { foo: 'bar' }
53 { path: common.userconfig,
57 { path: common.globalconfig,
60 builtin: { data: biData } }
62 test('with builtin', function (t) {
63 npmconf.load(cli, common.builtin, function (er, conf) {
65 t.same(conf.list, expectList)
66 t.same(conf.sources, expectSources)
67 t.same(npmconf.rootConf.list, [])
68 t.equal(npmconf.rootConf.root, npmconf.defs.defaults)
69 t.equal(conf.root, npmconf.defs.defaults)