From 9d561f9d3af3ca5dbe352eb463eac39031b259ae Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Sun, 27 Oct 2019 15:37:34 +0100 Subject: [PATCH] refactor(matcher): rename to path-matcher --- __tests__/matcher/ranking.spec.ts | 2 +- __tests__/matcher/resolve.spec.ts | 1 + src/matcher/index.ts | 2 +- src/matcher/{path-ranker.ts => path-matcher.ts} | 0 4 files changed, 3 insertions(+), 2 deletions(-) rename src/matcher/{path-ranker.ts => path-matcher.ts} (100%) diff --git a/__tests__/matcher/ranking.spec.ts b/__tests__/matcher/ranking.spec.ts index e820078b..c3600dd8 100644 --- a/__tests__/matcher/ranking.spec.ts +++ b/__tests__/matcher/ranking.spec.ts @@ -1,4 +1,4 @@ -import { createRouteRecordMatcher } from '../../src/matcher/path-ranker' +import { createRouteRecordMatcher } from '../../src/matcher/path-matcher' import { RegExpOptions } from 'path-to-regexp' import { RouteComponent } from '../../src/types' import { RouteRecordMatcher } from '../../src/matcher/types' diff --git a/__tests__/matcher/resolve.spec.ts b/__tests__/matcher/resolve.spec.ts index 0b8dd4c1..d62846f6 100644 --- a/__tests__/matcher/resolve.spec.ts +++ b/__tests__/matcher/resolve.spec.ts @@ -81,6 +81,7 @@ describe('Router Matcher', () => { } catch (error) { return error } + throw new Error('Expected Error to be thrown') } describe('alias', () => { diff --git a/src/matcher/index.ts b/src/matcher/index.ts index b2aae616..f0ca9daf 100644 --- a/src/matcher/index.ts +++ b/src/matcher/index.ts @@ -9,7 +9,7 @@ import { // MatchedRouteRecord, } from '../types' import { NoRouteMatchError, InvalidRouteMatch } from '../errors' -import { createRouteRecordMatcher, normalizeRouteRecord } from './path-ranker' +import { createRouteRecordMatcher, normalizeRouteRecord } from './path-matcher' import { RouteRecordMatcher } from './types' interface RouterMatcher { diff --git a/src/matcher/path-ranker.ts b/src/matcher/path-matcher.ts similarity index 100% rename from src/matcher/path-ranker.ts rename to src/matcher/path-matcher.ts -- 2.47.2