Update the testing guide to show the new connection pattern:
import { network } from "hardhat";
describe("Token", () => {
const { ethers } = network.mocha.connectOnBefore();
before(async () => {
counter = await ethers.deployContract("Token");
});
it("has the correct total supply", async function () {
const totalSupply = await token.totalSupply();
assert.equal(totalSupply, ethers.parseEther("1000000"));
});
});
Update the testing guide to show the new connection pattern: