@tester114/wallets-testing-nodes
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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();
  }
}

Readme

Keywords

Package Sidebar

Install

npm i @tester114/wallets-testing-nodes

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

3.04 kB

Total Files

3

Last publish

Collaborators

  • taven_n