Forrest logo
back to the hardhat tool

hardhat:tldr:a4471

hardhat: Run all given test files.
$ hardhat test ${filename1-js} ${filename2-js}
try on your machine

The command you have mentioned is hardhat test ${filename1-js} ${filename2-js}.

Here's an explanation of each component in the command:

  1. hardhat: This is a command-line tool used for Ethereum development. It provides a development environment, task runner, and testing framework.

  2. test: This is a subcommand provided by Hardhat to run test cases. It executes test scripts written in Solidity or JavaScript.

  3. ${filename1-js} and ${filename2-js}: These are placeholders representing two filenames with the .js file extension. They are command-line arguments passed to the hardhat test command. The specific filenames should be provided instead of ${filename1-js} and ${filename2-js}.

To execute this command successfully, you need to provide the actual filenames of JavaScript files you want to test in place of ${filename1-js} and ${filename2-js}.

For example, if you have two JavaScript test files named test1.js and test2.js, the command should be written like this:

hardhat test test1.js test2.js

This would execute the Hardhat test runner and run the tests defined in test1.js and test2.js files.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the hardhat tool