I increase time the same way as described in OpenZepplin samples in the test below:
it("should revert claim drawing with 'Android: bad state'", async () => {
const [owner, signer1] = await ethers.getSigners();
let duration = time.duration.seconds(3);
await time.increase(duration);
await truffleAssert.reverts(
android.claimPainting(1),
'Android: bad state'
);
});
And it fails with Error: Invalid JSON RPC response: ""
. How can i fix it?
time
is imported as const { time } = require("@openzeppelin/test-helpers");
+ "@openzeppelin/test-helpers": "0.5.15"
in package.json
.
I also use ethers
from hardhat, don't know if this could cause the problem.