From e55c791386c1b9b84404268687af0b8019c1c4bd Mon Sep 17 00:00:00 2001 From: Bauke Date: Wed, 19 Oct 2022 13:31:53 +0200 Subject: [PATCH] Fix name. --- source/redirect/base.ts | 2 +- tests/redirect.test.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/redirect/base.ts b/source/redirect/base.ts index 0b75f86..75f99bd 100644 --- a/source/redirect/base.ts +++ b/source/redirect/base.ts @@ -4,7 +4,7 @@ export const redirectTypes = ['hostname', 'simple'] as const; export type MatcherType = typeof matcherTypes[number]; export type RedirectType = typeof redirectTypes[number]; -export function narrowMatchType(value: string): value is MatcherType { +export function narrowMatcherType(value: string): value is MatcherType { return matcherTypes.includes(value as MatcherType); } diff --git a/tests/redirect.test.ts b/tests/redirect.test.ts index ac64f9b..3135947 100644 --- a/tests/redirect.test.ts +++ b/tests/redirect.test.ts @@ -4,7 +4,7 @@ import test from 'ava'; import { matcherTypes, - narrowMatchType, + narrowMatcherType, narrowRedirectType, parseRedirect, redirectTypes, @@ -99,9 +99,9 @@ test('Redirect.isMatch', (t) => { }); test('Narrow match & redirect types', (t) => { - t.false(narrowMatchType('invalid')); + t.false(narrowMatcherType('invalid')); t.false(narrowRedirectType('invalid')); - t.true(matcherTypes.every((value) => narrowMatchType(value))); + t.true(matcherTypes.every((value) => narrowMatcherType(value))); t.true(redirectTypes.every((value) => narrowRedirectType(value))); });