Replies: 2 comments
-
|
@AYOO117 It looks like the |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
there was a blunder in code ,i missed a code line |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
FundMe.test.js
const { assert, expect } = require("chai") const { network, deployments, ethers } = require("hardhat") const { developmentChains } = require("../../helper-hardhat-config") const { describe } = require("node:test") describe("FundMe", function () { let fundMe let mockV3Aggregator let deployer const sendValue = ethers.utils.parseEther("1") beforeEach(async () => { // const accounts = await ethers.getSigners() // deployer = accounts[0] deployer = (await getNamedAccounts()).deployer await deployments.fixture(["all"]) fundMe = await ethers.getContract("FundMe", deployer) mockV3Aggregator = await ethers.getContract( "MockV3Aggregator", deployer ) }) describe("constructor", function () { it("sets the aggregator addresses correctly", async () => { const response = await fundMe.getPriceFeed() assert.equal(response, mockV3Aggregator.address) }) }) describe("fund", async function () { await expect(fundMe.fund()).to.be.revertedWith( "need to spend more ETH!" ) }) })FundMe.sol
Beta Was this translation helpful? Give feedback.
All reactions