I am doing smart contract testing with hardat and mocha framework. Suppose I have two following it
blocks testing contract A.
it('test1', () => {
contractA.updateValue(val);
// some other testing code
});
it('test2', () => {
contractA.useUpdatedValue();
// some other testing code
});
Here, contracA
is defined in the global scope. Is there a way to persist the smart contract state in test1
and then do test2
to use the updated state of the smart contract?