To prepare these tests, we used
this article as an example. First of all, you need to install hardhat > 2.4.0 via npm or yarn. Next, you must add a copy of the smart contract code which you would like to change in your project repo. A little tip before we start discussing the code, if you use
blockGasLimit in hardhat config, you must tune it right so that tests would execute (in our case we simply removed this parameter from config). Add all necessary changes to this code and deploy it to testnet via
ethers.getContractFactory like this: