seperate rpcnode from extended classes
This commit is contained in:
parent
fefe871a35
commit
8b81348189
|
@ -47,9 +47,9 @@ const RPCTests = {
|
||||||
getTokenBalance: testGetTokenBalance
|
getTokenBalance: testGetTokenBalance
|
||||||
};
|
};
|
||||||
|
|
||||||
function testRequests(node: RPCNode, service: string) {
|
function testRpcRequests(node: RPCNode, service: string) {
|
||||||
Object.keys(RPCTests).forEach(testType => {
|
Object.keys(RPCTests).forEach(testType => {
|
||||||
describe('RPC getBalance should work', () => {
|
describe(`RPC (${service}) should work`, () => {
|
||||||
it(`RPC: ${testType} ${service}`, () => {
|
it(`RPC: ${testType} ${service}`, () => {
|
||||||
return RPCTests[testType](node).then(d => expect(d.valid).toBeTruthy());
|
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 mapNodeEndpoints = (nodes: { [key: string]: NodeConfig }) => {
|
||||||
const testList = ['eth_mew', 'etc_epool'];
|
const RpcNodeList = ['eth_mew', 'etc_epool', 'etc_epool', 'rop_mew'];
|
||||||
testList.forEach(n => {
|
|
||||||
testRequests(
|
RpcNodeList.forEach(n => {
|
||||||
|
testRpcRequests(
|
||||||
nodes[n].lib as RPCNode,
|
nodes[n].lib as RPCNode,
|
||||||
`${nodes[n].service} ${nodes[n].network}`
|
`${nodes[n].service} ${nodes[n].network}`
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue