UNPKG

@sofaws/dapp-core

Version:

A library to hold the main logic for a dapp on the Elrond Network

3 lines (2 loc) 688 B
"use strict";import{a as t}from"../../../../../__chunks__/chunk-NCHDT5N7.js";import{m as s}from"../../../../../__chunks__/chunk-HBP5N4FR.js";s();describe("getNetworkLink",()=>{it('return "/${to}" parameter when the explorerAddress is empty and log an error in console',()=>{jest.mock("console",()=>({error:()=>null}));let e="address",r=jest.spyOn(console,"error"),o=t({explorerAddress:"",to:e});expect(r).toHaveBeenCalled(),expect(o).toEqual(`/${e}`)}),it('compose link using explorer address and "to" parameter',()=>{let e="http://devnet-explorer.elrond.com",r="/address",o=t({explorerAddress:e,to:r});expect(o).toEqual(`${e}${r}`)})}); //# sourceMappingURL=getExplorerkLink.test.js.map