Function mockBalance

  • Set MAS balance for a given address..

    Example

    test('mocked balance', () => {
    const addr = 'A12BqZEQ6sByhRLyEuf0YbQmcF2PsDdkNNG1akBJu9XcjZA1eT';
    const balance: u64 = 123;
    mockBalance(addr.toString(), balance);
    const res = balanceOf(addr);
    expect(res).toBe(balance);
    });

    Parameters

    • address: string

      The address to set the balance for

    • balance: number

    Returns void

Generated using TypeDoc