fix(tests): fix tests

This commit is contained in:
Juergen Kunz
2025-06-23 08:38:14 +00:00
parent 1aead55296
commit be58700a2f
14 changed files with 153 additions and 107 deletions

View File

@ -95,7 +95,8 @@ export class PathMatcher implements IMatcher<IPathMatchResult> {
if (normalizedPattern.includes('*') && match.length > paramNames.length + 1) {
const wildcardCapture = match[match.length - 1];
if (wildcardCapture) {
pathRemainder = wildcardCapture;
// Ensure pathRemainder includes leading slash if it had one
pathRemainder = wildcardCapture.startsWith('/') ? wildcardCapture : '/' + wildcardCapture;
pathMatch = normalizedPath.substring(0, normalizedPath.length - wildcardCapture.length);
}
}