Files
zeekay 62f00bc7fa Modernize e2e tests: Remove node-gyp dependencies and update to Node.js 24
- Switched from yarn to pnpm for better dependency management
- Updated to Node.js 24 in CI workflow
- Replaced deprecated packages with modern alternatives:
  - @nomiclabs/hardhat-* → @nomicfoundation/hardhat-*
  - ethers v5 → ethers v6
  - Removed packages that require node-gyp (waffle, old typechain)
- Updated hardhat to v2.22.0 with full Node.js 24 support
- Fixed test code for ethers v6 API changes
- Significantly reduced native dependencies (only keccak and secp256k1 remain)
2025-07-21 18:10:05 -05:00

21 lines
646 B
TypeScript

import { expect } from "chai"
import { ethers } from "hardhat"
import config from "../hardhat.config"
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.waitForDeployment()
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!")
})
})