mirror of https://github.com/embarklabs/embark.git
Updating tests
This commit is contained in:
parent
48a3f2afdc
commit
38e6a9571d
|
@ -76,9 +76,12 @@ var Blockchain = function(options) {
|
|||
};
|
||||
|
||||
Blockchain.prototype.setupProxy = function() {
|
||||
this.config.proxy = true;
|
||||
if (this.blockchainConfig.proxy === false) {
|
||||
this.config.proxy = false;
|
||||
return;
|
||||
}
|
||||
|
||||
const proxy = require('../../core/proxy');
|
||||
const Ipc = require('../../core/ipc');
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/*globals describe, it*/
|
||||
const Blockchain = require('../lib/cmds/blockchain/blockchain');
|
||||
const constants = require('../lib/constants.json');
|
||||
|
||||
const assert = require('assert');
|
||||
|
||||
|
@ -39,10 +40,15 @@ describe('embark.Blockchain', function () {
|
|||
targetGasLimit: false,
|
||||
fast: false,
|
||||
light: false,
|
||||
verbosity: undefined
|
||||
verbosity: undefined,
|
||||
proxy: true
|
||||
};
|
||||
let blockchain = new Blockchain(config, 'geth');
|
||||
|
||||
if(config.proxy){
|
||||
config.wsPort += constants.blockchain.servicePortOnProxy;
|
||||
config.rpcPort += constants.blockchain.servicePortOnProxy;
|
||||
}
|
||||
assert.deepEqual(blockchain.config, config);
|
||||
done();
|
||||
});
|
||||
|
@ -77,10 +83,16 @@ describe('embark.Blockchain', function () {
|
|||
targetGasLimit: false,
|
||||
fast: false,
|
||||
light: false,
|
||||
verbosity: undefined
|
||||
verbosity: undefined,
|
||||
proxy: true
|
||||
};
|
||||
let blockchain = new Blockchain(config, 'geth');
|
||||
|
||||
if(config.proxy){
|
||||
config.wsPort += constants.blockchain.servicePortOnProxy;
|
||||
config.rpcPort += constants.blockchain.servicePortOnProxy;
|
||||
}
|
||||
|
||||
assert.deepEqual(blockchain.config, config);
|
||||
done();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue