seperate rpcnode from extended classes

This commit is contained in:
Eddie Wang 2017-11-19 20:42:31 -05:00
parent fefe871a35
commit 8b81348189
1 changed files with 6 additions and 5 deletions

View File

@ -47,9 +47,9 @@ const RPCTests = {
getTokenBalance: testGetTokenBalance
};
function testRequests(node: RPCNode, service: string) {
function testRpcRequests(node: RPCNode, service: string) {
Object.keys(RPCTests).forEach(testType => {
describe('RPC getBalance should work', () => {
describe(`RPC (${service}) should work`, () => {
it(`RPC: ${testType} ${service}`, () => {
return RPCTests[testType](node).then(d => expect(d.valid).toBeTruthy());
});
@ -58,9 +58,10 @@ function testRequests(node: RPCNode, service: string) {
}
const mapNodeEndpoints = (nodes: { [key: string]: NodeConfig }) => {
const testList = ['eth_mew', 'etc_epool'];
testList.forEach(n => {
testRequests(
const RpcNodeList = ['eth_mew', 'etc_epool', 'etc_epool', 'rop_mew'];
RpcNodeList.forEach(n => {
testRpcRequests(
nodes[n].lib as RPCNode,
`${nodes[n].service} ${nodes[n].network}`
);