Skip to content

Add --parallel flag for hardhat tests #7580

@schaable

Description

@schaable

Describe the feature

In Hardhat 2, we had a --parallel flag for Mocha tests. This flag wasn't ported to Hardhat 3.
In Hardhat 3, we now have two test runners:

  • Node.js test runner: runs tests in parallel by default (as of #7311)
  • Mocha: can only be configured to run in parallel through the hardhat config file:
const config: HardhatUserConfig = {
  ...,  
  test: {
    mocha: {
      parallel: true,
    },
  },
};

We need to decide how to handle the --parallel flag in Hardhat 3.

Currently, there's an inconsistency where Mocha requires config-based setup while Node.js has parallel as the default behavior.

Search terms

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions