OpenViSTAI · Agents · Blockchain · Crypto
Menu
Developer Tools

Eth Testing

Eth Testing is a TypeScript utility for creating mock Ethereum providers and simulating blockchain interactions in application tests.

Independent OpenViST project profile, based on linked sources.

Eth Testing — OpenViST project profile in Developer Tools.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when tests need controlled Ethereum provider states or simulated blockchain interactions, particularly in applications with wallet connections or contract calls.

Who it is for

  • Developers testing applications that consume Ethereum providers.
  • Teams writing tests for wallet connections or contract interactions.

Documented uses

  • Simulate connected, disconnected, or read-only provider states.
  • Test application responses to provider and blockchain interactions.
  • Exercise contract-facing application behavior without tying the core mocks to one Ethereum interaction library.
Before you choose

Requirements & limits

The repository identifies the project as MIT licensed and recommends installing it as a development dependency. Its README states that the repository is no longer maintained.

  • The core mocks are described as independent of the Ethereum interaction library used by the application.
  • Provider injection must follow the application's own implementation; the README demonstrates window.ethereum for MetaMask.
  • The README recommends clearing mocks between tests.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Set up a mock provider in a test

Install Eth Testing and prepare a mock provider for an application test.

Before you start

  • An application test environment.
  • npm or Yarn.

Steps

  1. Install eth-testing as a development dependency with npm or Yarn.

  2. Call generateTestingUtils with a documented provider type such as MetaMask.

  3. Inject the provider returned by getProvider() where the application expects its Ethereum provider; the README's MetaMask example uses window.ethereum.

  4. Clear mock state between tests with clearAllMocks, as shown in the README's Jest example.

Expected outcome

The test environment has a generated mock Ethereum provider and a documented way to clear its mocks between tests.

Guide limitations

  • Provider injection depends on the application's implementation.
  • The repository states that it is no longer maintained.
Source-based practical guide

Choose a simulated wallet or provider state

Configure a mock state for application tests that depend on Ethereum provider responses.

Before you start

  • Eth Testing installed as a development dependency.
  • Testing utilities generated with generateTestingUtils.

Steps

  1. Choose a documented high-level mock: mockReadonlyProvider, mockNotConnectedWallet, or mockConnectedWallet.

  2. For a connected wallet, pass the accounts to mockConnectedWallet; use its options to set chain ID or block number when needed.

  3. Run the application test against the configured provider state and clear mocks between tests.

Expected outcome

Tests can exercise application behavior with a selected read-only, disconnected-wallet, or connected-wallet provider state.

Guide limitations

  • The repository is no longer maintained.
  • The README describes the mock states and examples but does not establish compatibility with every application or test setup.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
15 October 2026
Original website title
VGLoic/eth-testing-monorepo · Official homepage title · retained in its source language