Skip to content

Commit

Permalink
sdk: remove Ganache for integration tests
Browse files Browse the repository at this point in the history
The integration tests do not need an Ethereum node anymore (and never
will in future). Therefore all parts that refer to the Ganache client
can be removed.
  • Loading branch information
weilbith committed Mar 23, 2021
1 parent 680a6c2 commit c40344a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 260 deletions.
1 change: 0 additions & 1 deletion raiden-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
"@types/pouchdb-find": "^6.3.6",
"@types/redux-logger": "^3.0.8",
"@types/tiny-async-pool": "^1.0.0",
"ganache-cli": "^6.12.2",
"jest": "^26.6.3",
"jest-environment-node": "^26.6.2",
"jest-extended": "^0.11.5",
Expand Down
46 changes: 1 addition & 45 deletions raiden-ts/tests/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,47 +1,3 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
declare module 'ganache-cli' {
import 'jest-extended';
import type { Http2Server } from 'http2';
import type { ExternalProvider } from '@ethersproject/providers';

export interface GanacheServerOptions {
accounts?: { balance: string; secretKey?: string }[];
debug?: boolean;
blockTime?: number;
logger?: { log: (...args: any[]) => void };
mnemonic?: string;
port?: number;
seed?: string;
default_balance_ether?: number;
total_accounts?: number;
fork?: string;
fork_block_number?: string | number;
network_id?: number;
_chainIdRpc?: number;
_chainId?: number;
time?: Date;
locked?: boolean;
unlocked_accounts?: string[];
db_path?: string;
db?: any;
ws?: boolean;
account_keys_path?: string;
vmErrorsOnRPCResponse?: boolean;
hdPath?: string;
hardfork?: string;
allowUnlimitedContractSize?: boolean;
gasPrice?: string;
gasLimit?: string;
keepAliveTimeout?: number;
}

export interface Ganache {
provider(options?: GanacheServerOptions): ExternalProvider;
server(options?: GanacheServerOptions): Http2Server;
}

const ganache: Ganache;
export default ganache;
}
import 'jest-extended';

declare module 'pouchdb-debug';
Loading

0 comments on commit c40344a

Please sign in to comment.