Set mock for smartcontract call. When called multiple time, mocked values will be added in the mock stack.
test('mocked SC call', () => { const addr = new Address( 'A12BqZEQ6sByhRLyEuf0YbQmcF2PsDdkNNG1akBJu9XcjZA1eT', ); const mockValue: StaticArray<u8> = [1,2,3]; mockScCall(mockValue); const res = call(addr, 'someFunc', NoArg, 0); expect(res).toBe(mockValue);});
Value returned by the mocked function
Generated using TypeDoc
Set mock for smartcontract call. When called multiple time, mocked values will be added in the mock stack.
Example