Skip to main content
Configures Synpress for use with MetaMask. This function sets up the necessary configurations and hooks for running Cypress tests with MetaMask.

Parameters

Returns

Modified Cypress configuration

Throws

Error If no Chrome browser is found in the configuration

Remarks

This function performs the following tasks:
  1. Filters the available browsers to ensure only Chrome is used.
  2. Sets up a ‘before:browser:launch’ hook to enable debug mode, establish a Playwright connection, and initialize MetaMask.
  3. Sets up a ‘before:spec’ hook to import the MetaMask wallet before each test spec runs.
  4. Provides task handlers for various MetaMask-related operations.

Example