error while testing #5003
Answered
by
alymurtazamemon
jeevansiddu
asked this question in
Q&A
-
This is the code I wrote for testing const { inputToConfig } = require("@ethereum-waffle/compiler");
const { assert, expect } = require("chai");
const { deployments, ethers, getNamedAccounts } = require("hardhat");
describe("FundMe", async function() {
let fundMe, deployer, MockV3Aggregator;
beforeEach(async () => {
//deploy fundme contract using hardhat-deploy
deployer = (await getNamedAccounts()).deployer; // getting only deployer object named accounts and assigning to deployer variable
// const accounts = ethers.getSigners(); // get the list of all accounts you have given in the hardhat.config,chainId
// const firstAccount = accounts[0];
await deployments.fixture(["all"]);
fundMe = await ethers.getContract("FundMe", deployer); // getContract will give recently deployed fundMe contract
MockV3Aggregator = await ethers.getContract(
"MockV3Aggregator",
deployer
);
});
// describe("constructor", async function() {
// it("sets the aggregotor interface correctly", async function() {
// const response = await fundME.priceFeed();
// console.log(response);
// assert.equal(response, MockV3Aggregator.address);
// });
// });
describe("Fund", function() {
it("Fails if you dont send enough money", async function() {
assert.equal("hi", "hi");
// await expect(fundMe.fund()).to.be.reverted;
});
});
}); and this is the error Im getting
Can you please tell me why and also Im earning this web3 space with my full potential but seeing all the things happening Its fearing me will I actually be able to get a good job .., hey experts whats your opinion currently on jobs on web3 , can someone get a web3 job as a fresh graduate??? |
Beta Was this translation helpful? Give feedback.
Answered by
alymurtazamemon
Mar 4, 2023
Replies: 1 comment 4 replies
-
@jeevansiddu which version of ethers are you using? If you are using ethers version 6 or above then it is in beta. Use below 6, for that run this command |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
alymurtazamemon
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@jeevansiddu which version of ethers are you using? If you are using ethers version 6 or above then it is in beta. Use below 6, for that run this command
npm i --save-dev ethers@5.7.2