luhmann/hired

View on GitHub
src/lib/__tests__/__snapshots__/router.spec.ts.snap

Summary

Maintainability
Test Coverage
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Router should initialize 1`] = `
Object {
  "add": [Function],
  "addEventListener": [Function],
  "addListener": [Function],
  "addNode": [Function],
  "addNodeListener": [Function],
  "addRouteListener": [Function],
  "areStatesDescendants": [Function],
  "areStatesEqual": [Function],
  "buildPath": [Function],
  "buildState": [Function],
  "buildUrl": [Function],
  "canActivate": [Function],
  "canDeactivate": [Function],
  "cancel": [Function],
  "clearCanDeactivate": [Function],
  "clearMiddleware": [Function],
  "clone": [Function],
  "executeFactory": [Function],
  "getDependencies": [Function],
  "getLifecycleFactories": [Function],
  "getLifecycleFunctions": [Function],
  "getListeners": [Function],
  "getMiddlewareFactories": [Function],
  "getMiddlewareFunctions": [Function],
  "getOptions": [Function],
  "getPlugins": [Function],
  "getState": [Function],
  "hasPlugin": [Function],
  "invokeEventListeners": [Function],
  "isActive": [Function],
  "isStarted": [Function],
  "makeNotFoundState": [Function],
  "makeState": [Function],
  "matchPath": [Function],
  "matchUrl": [Function],
  "navigate": [Function],
  "navigateToDefault": [Function],
  "removeEventListener": [Function],
  "removeListener": [Function],
  "removeNodeListener": [Function],
  "removeRouteListener": [Function],
  "replaceHistoryState": [Function],
  "rootNode": RouteNode {
    "absolute": false,
    "children": Array [
      RouteNode {
        "absolute": false,
        "children": Array [],
        "name": "PROJECT_NEW",
        "parent": [Circular],
        "parser": Path {
          "hasMatrixParams": false,
          "hasQueryParams": false,
          "hasSpatParam": false,
          "hasUrlParams": false,
          "params": Array [],
          "path": "/project/new",
          "queryParams": Array [],
          "queryParamsBr": Array [],
          "source": "\\\\/project\\\\/new",
          "spatParams": Array [],
          "tokens": Array [
            Object {
              "match": "/",
              "otherVal": Array [],
              "regex": /\\\\//,
              "type": "delimiter",
              "val": Array [
                "/",
              ],
            },
            Object {
              "match": "project",
              "otherVal": Array [],
              "regex": /project/,
              "type": "fragment",
              "val": Array [
                "project",
              ],
            },
            Object {
              "match": "/",
              "otherVal": Array [],
              "regex": /\\\\//,
              "type": "delimiter",
              "val": Array [
                "/",
              ],
            },
            Object {
              "match": "new",
              "otherVal": Array [],
              "regex": /new/,
              "type": "fragment",
              "val": Array [
                "new",
              ],
            },
          ],
          "urlParams": Array [],
        },
        "path": "/project/new",
      },
      RouteNode {
        "absolute": false,
        "children": Array [],
        "name": "PROJECT_OVERVIEW",
        "parent": [Circular],
        "parser": Path {
          "hasMatrixParams": false,
          "hasQueryParams": false,
          "hasSpatParam": false,
          "hasUrlParams": true,
          "params": Array [
            "projectId",
          ],
          "path": "/project/:projectId",
          "queryParams": Array [],
          "queryParamsBr": Array [],
          "source": "\\\\/project\\\\/([a-zA-Z0-9-_.~%':]+)",
          "spatParams": Array [],
          "tokens": Array [
            Object {
              "match": "/",
              "otherVal": Array [],
              "regex": /\\\\//,
              "type": "delimiter",
              "val": Array [
                "/",
              ],
            },
            Object {
              "match": "project",
              "otherVal": Array [],
              "regex": /project/,
              "type": "fragment",
              "val": Array [
                "project",
              ],
            },
            Object {
              "match": "/",
              "otherVal": Array [],
              "regex": /\\\\//,
              "type": "delimiter",
              "val": Array [
                "/",
              ],
            },
            Object {
              "match": ":projectId",
              "otherVal": Array [
                undefined,
                undefined,
              ],
              "regex": /\\(\\[a-zA-Z0-9-_\\.~%':\\]\\+\\)/,
              "type": "url-parameter",
              "val": Array [
                "projectId",
              ],
            },
          ],
          "urlParams": Array [
            "projectId",
          ],
        },
        "path": "/project/:projectId",
      },
      RouteNode {
        "absolute": false,
        "children": Array [],
        "name": "PROJECT_LIST",
        "parent": [Circular],
        "parser": Path {
          "hasMatrixParams": false,
          "hasQueryParams": false,
          "hasSpatParam": false,
          "hasUrlParams": false,
          "params": Array [],
          "path": "/",
          "queryParams": Array [],
          "queryParamsBr": Array [],
          "source": "\\\\/",
          "spatParams": Array [],
          "tokens": Array [
            Object {
              "match": "/",
              "otherVal": Array [],
              "regex": /\\\\//,
              "type": "delimiter",
              "val": Array [
                "/",
              ],
            },
          ],
          "urlParams": Array [],
        },
        "path": "/",
      },
    ],
    "name": "",
    "parent": undefined,
    "parser": null,
    "path": "",
  },
  "setDependencies": [Function],
  "setDependency": [Function],
  "setOption": [Function],
  "setRootPath": [Function],
  "setState": [Function],
  "start": [Function],
  "stop": [Function],
  "transitionToState": [Function],
  "urlToPath": [Function],
  "useMiddleware": [Function],
  "usePlugin": [Function],
}
`;