@lidofinance/wallets-testing-nodes
v1.1.0
Published
Module for using local ganache node with playwright helpers
Downloads
418
Readme
Node Module
Module for using local ganache node with playwright helpers
Install
yarn add @lidofinance/wallets-testing-nodes
Usage
Import this module and provide rpcUrl
parameter via factory
@Module({
imports: [
NodeModule.forRoot(
(configService: ConfigService) => {
return { rpcUrl: configService.get('RPC_URL') };
},
[ConfigService],
[ConfigModule],
),
],
})
export class MyModule {}
// Usage
export class MyService {
constructor(private ethereumNodeService: EthereumNodeService) {}
async myMethod() {
await this.ethereumNodeService.startNode();
const state = await this.ethereumNodeService.state;
expect(state).toBeDefined()
await this.ethereumNodeService.stopNode();
}
}