-
Notifications
You must be signed in to change notification settings - Fork 281
Open
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`
....
});
});