Skip to content

upgrades.deployProxy hangs in hh coverage #702

Open
@davidtperk

Description

Fixtures seem to hang indefinitely when running hh coverage. All tests that make use of fixtures fail with Error: Timeout of 40000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves....

Conversely, the same tests pass when running hh test.

import { MyContract } from "../types"; 
import { waffle } from "hardhat";
const { loadFixture, provider } = waffle;

interface MyFixture {
    myContract: MyContract;
}

describe("Tests", () => {
    async function myFixture(): Promise<MyFixture> {
        const myContract = MyContract__factory.connect(address, provider);
        return { myContract };
    }

    it("can test something", async () => {
        console.log(0);
        const { myContract } = await loadFixture(myFixture);
        console.log(1); // only outputted when running `hh test`
        ....
    });
});

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions