Skip to content

0xMacro/hardhat_testing_demo

Repository files navigation

Hardhat Testing Demo

This project demonstrates writing Hardhat unit tests for a basic smart contract in Solidity.

Project Setup

Install nvm if you don't have it already:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash

Install and switch to node version specified in .nvmrc file:

nvm install

Install all needed dependencies:

npm install

Running the tests

Run the following to have the tests run once:

npx hardhat test

Run the following to have the tests in "watch" mode, where any changes to the contracts and test files will trigger compilation of the contracts (if necessary) and another run of the tests:

npm run test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published