hardhat-gas-reporter icon indicating copy to clipboard operation
hardhat-gas-reporter copied to clipboard

Adding hardhat-gas-reporter breaks chai expect(BigInt) check

Open valar999 opened this issue 1 year ago • 0 comments

const { ethers } = require("hardhat");
const { expect } = require("chai");

describe("Test", function () {
  it("should exit with error", async function () {
    expect(1n).to.equal(2n);
  });
});

It ends immediately without reporting and even exit code is 0.

Everything works as expected if you remove hardhat-gas-reporter from hardhat.config.js or replace expect that use BigNum with expect(1).to.equal(2);

Example: https://github.com/valar999/bug-hardhat-gas-reporter

valar999 avatar Sep 15 '22 15:09 valar999