Fix name.

This commit is contained in:
Bauke 2022-10-19 13:31:53 +02:00
parent 3fe297b8f1
commit e55c791386
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
2 changed files with 4 additions and 4 deletions

View File

@ -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);
}

View File

@ -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)));
});