How to test sending eth to function using ethers.js?
describe("User 1 bets on team 1", function () { it("Should transfer eth from User1 to the contract", async function () { //user 1 makes a bet on team one await betting.connect(addr1).betOnTeam(1, {value: 2000000000000000}); // 0.002 ether const newAmountOne = await betting.AmountOne(); expect(newAmountOne).to.equal(3); }); });
https://ethereum.stackexchange.com/questions/117641/how-to-test-sending-eth-to-function-using-ethers-js