1234567891011121314151617181920212223242526 |
- import { loadFixture } from "@nomicfoundation/hardhat-network-helpers";
- import { ethers } from "hardhat";
- import type { Signers } from "../types";
- import { shouldBehaveLikeGreeter } from "./Greeter.behavior";
- import { deployGreeterFixture } from "./Greeter.fixture";
- describe("Unit tests", function () {
- before(async function () {
- this.signers = {} as Signers;
- const signers = await ethers.getSigners();
- this.signers.admin = signers[0];
- this.loadFixture = loadFixture;
- });
- describe("Greeter", function () {
- beforeEach(async function () {
- const { greeter } = await this.loadFixture(deployGreeterFixture);
- this.greeter = greeter;
- });
- shouldBehaveLikeGreeter();
- });
- });
|