Skip to content
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.

Path matching is sensitive to trailing slash #4

Closed
kettanaito opened this issue Mar 10, 2020 · 0 comments · Fixed by #5
Closed

Path matching is sensitive to trailing slash #4

kettanaito opened this issue Mar 10, 2020 · 0 comments · Fixed by #5
Labels
bug Something isn't working

Comments

@kettanaito
Copy link
Member

Consider this usage example:

import { match } from 'node-match-path'

match('https://test.msw.io', 'https://test.msw.io/')

Current behavior

The given path won't match the expected path.

Expected behavior

Trailing slash is ignored when matching paths.

Motivation

Trailing slash is often appended by the client automatically. For example, executing fetch('https://test.msw.io') would perform an actual request to https://test.msw.io/.

@kettanaito kettanaito added the bug Something isn't working label Mar 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant