You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
beforeEach(async()=>{
// list a item
transaction = await dappazon.connect(deployer).list(
ID,
NAME,
CATEGORY,
IMAGE,
COST,
RATING,
STOCK
)
await transaction.wait()
// buy an item
transaction = await dappazon.connect(buyer).buy(ID,{value:COST})
await transaction.wait()
// get deployer balance before
balanceBefore = await ethers.provider.getBalance(deployer.address);
// withdraw
transaction = await dappazon.connect(deployer).withdraw();
await transaction.wait()
})
it("Update the owner balance", async()=>{
const balanceAfter = await ethers.provider.getBalance(buyer.address);
expect(balanceAfter).to.be.greaterThan(balanceBefore)
})
it("Update the contract balance", async()=>{
const result = await ethers.provider.getBalance(deployer.address);
expect(result).to.equal(0)
})
})
i get the err, the err message like
AssertionError: expected 9994998096167587283777 to be above 9999982111701002581047. The numerical values of the given "ethers.BigNumber" and "ethers.BigNumber" inputs were compared, and they differed.
The text was updated successfully, but these errors were encountered:
the withdraw can't pass the test,
My code like this
})
i get the err, the err message like
AssertionError: expected 9994998096167587283777 to be above 9999982111701002581047. The numerical values of the given "ethers.BigNumber" and "ethers.BigNumber" inputs were compared, and they differed.
The text was updated successfully, but these errors were encountered: