- Adds parameter to cli methods to be able to specify the location of services modules. This is useful for packages that wrap bitcore-node to be able to pass along a node_modules directory with services. - Adds another parameter for including additional services in the default settings. - Will use the `process.env.HOME + '/.bitcore` as the default configuration location. - There are now two `getDefaultConfig`, one that will instatiate a `~/.bitcore` directory with a default if it doesn't exist, and `getBaseDefaultConfig` that will return a basic configuration without additional services enabled. - Changes logic to use the global install if a local node_modules version is not available, this would previously assume that it was a local install because of the existence of a configuration file.
18 lines
597 B
JavaScript
18 lines
597 B
JavaScript
'use strict';
|
|
|
|
var should = require('chai').should();
|
|
var defaultBaseConfig = require('../../lib/scaffold/default-base-config');
|
|
|
|
describe('#defaultConfig', function() {
|
|
it('will return expected configuration', function() {
|
|
var cwd = process.cwd();
|
|
var home = process.env.HOME;
|
|
var info = defaultBaseConfig();
|
|
info.path.should.equal(cwd);
|
|
info.config.datadir.should.equal(home + '/.bitcoin');
|
|
info.config.network.should.equal('livenet');
|
|
info.config.port.should.equal(3001);
|
|
info.config.services.should.deep.equal(['bitcoind', 'db', 'address', 'web']);
|
|
});
|
|
});
|