UNPKG

@sofaws/dapp-core

Version:

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

3 lines (2 loc) 815 B
"use strict";import{a as t}from"../../../../__chunks__/chunk-3565BFXD.js";import"../../../../__chunks__/chunk-2JEF2QS7.js";import{m as s}from"../../../../__chunks__/chunk-HBP5N4FR.js";s();var r=(e,o=!0)=>[{path:e,component:()=>null,authenticatedRoute:o}];describe("matchRoute",()=>{it("should return true for simple routes",()=>{let e=t(r("/home"),"/home");expect(e).toBe(!0)}),it("should return true for pattern routes",()=>{let e=t(r("/user/:id"),"/user/first-name");expect(e).toBe(!0)}),it("should return false for non-matching pattern routes",()=>{let e=t(r("/user/:id"),"/user/first-name/detail");expect(e).toBe(!1)}),it("should return true for non-athenticated non-matching pattern routes",()=>{let e=t(r("/user/:id",!1),"/user/first-name");expect(e).toBe(!1)})}); //# sourceMappingURL=matchRoute.test.js.map