Skip to content

Expect fails while comparing BigNumber #1382

@AbdulRafaySiddiqui

Description

@AbdulRafaySiddiqui

Can anyone tell, why both of the following expects are failing

const hre = require("hardhat");
const { ethers } = hre;
const { BigNumber, utils } = ethers;

describe("Deploy YDF token and check balance", function () {
    it("Deployer balance should be equal to 30K", async function () {
        
        expect(utils.parseEther("1.0")).to.equals(utils.parseEther("1.0"));
        expect(BigNumber.from("30000000000000000000000")).to.equals(BigNumber.from("30000000000000000000000"));
    });
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions