diff --git a/tests/redirect.test.ts b/tests/redirect.test.ts index d73009a..eeaa61b 100644 --- a/tests/redirect.test.ts +++ b/tests/redirect.test.ts @@ -3,7 +3,11 @@ import test from 'ava'; import { + matcherTypes, + narrowMatchType, + narrowRedirectType, parseRedirect, + redirectTypes, HostnameRedirect, Redirect, Redirects, @@ -93,3 +97,10 @@ test('Redirect.isMatch', (t) => { } } }); + +test('Narrow match & redirect types', (t) => { + t.false(narrowMatchType('invalid')); + t.false(narrowRedirectType('invalid')); + t.true(matcherTypes.every((type) => narrowMatchType(type))); + t.true(redirectTypes.every((type) => narrowRedirectType(type))); +});