Function mockTransferredCoins

  • Set mock for call coins.

    Remarks

    This function is used to mock the call coins value for test purpose. Don't forget to reset the mock after the test.

    Example

    test('mocked SC call', () => {
    const coins: u64 = 123;
    mockTransferredCoins(coins);
    const res = transferredCoins();
    expect(res).toBe(coins);
    mockTransferredCoins(0); // Don't forget to reset the mock

    });

    Parameters

    • value: number

    Returns void

Generated using TypeDoc