mirror of
https://github.com/Instadapp/infinite-proxy.git
synced 2024-07-29 21:47:49 +00:00
20 lines
609 B
TypeScript
20 lines
609 B
TypeScript
|
import { expect } from "chai";
|
||
|
import { ethers } from "hardhat";
|
||
|
|
||
|
describe("Greeter", function () {
|
||
|
it("Should return the new greeting once it's changed", async function () {
|
||
|
const Greeter = await ethers.getContractFactory("Greeter");
|
||
|
const greeter = await Greeter.deploy("Hello, world!");
|
||
|
await greeter.deployed();
|
||
|
|
||
|
expect(await greeter.greet()).to.equal("Hello, world!");
|
||
|
|
||
|
const setGreetingTx = await greeter.setGreeting("Hola, mundo!");
|
||
|
|
||
|
// wait until the transaction is mined
|
||
|
await setGreetingTx.wait();
|
||
|
|
||
|
expect(await greeter.greet()).to.equal("Hola, mundo!");
|
||
|
});
|
||
|
});
|