mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 02:08:55 +02:00
fix(theme-common): isSamePath should be case-insensitive (#6758)
This commit is contained in:
parent
39b66d82ef
commit
44a65f3337
3 changed files with 18 additions and 2 deletions
|
@ -16,6 +16,14 @@ describe('isSamePath', () => {
|
|||
expect(isSamePath('/docs', '/docs/')).toBeTruthy();
|
||||
});
|
||||
|
||||
test('should be true for compared path with different case', () => {
|
||||
expect(isSamePath('/doCS', '/DOcs')).toBeTruthy();
|
||||
});
|
||||
|
||||
test('should be true for compared path with different case + trailing slash', () => {
|
||||
expect(isSamePath('/doCS', '/DOcs/')).toBeTruthy();
|
||||
});
|
||||
|
||||
test('should be false for compared path with double trailing slash', () => {
|
||||
expect(isSamePath('/docs', '/docs//')).toBeFalsy();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue