Greeter.ts 721 B

1234567891011121314151617181920212223242526
  1. import { loadFixture } from "@nomicfoundation/hardhat-network-helpers";
  2. import { ethers } from "hardhat";
  3. import type { Signers } from "../types";
  4. import { shouldBehaveLikeGreeter } from "./Greeter.behavior";
  5. import { deployGreeterFixture } from "./Greeter.fixture";
  6. describe("Unit tests", function () {
  7. before(async function () {
  8. this.signers = {} as Signers;
  9. const signers = await ethers.getSigners();
  10. this.signers.admin = signers[0];
  11. this.loadFixture = loadFixture;
  12. });
  13. describe("Greeter", function () {
  14. beforeEach(async function () {
  15. const { greeter } = await this.loadFixture(deployGreeterFixture);
  16. this.greeter = greeter;
  17. });
  18. shouldBehaveLikeGreeter();
  19. });
  20. });