Skip to content

Commit

Permalink
test: add test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed May 1, 2024
1 parent cddd691 commit 62af79c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/shared/tests/normalizeRoutePath.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,18 @@ const testCases = [
[['foo/.md'], 'foo/.html'],
[['/.md'], '/.html'],
[['/foo/.md'], '/foo/.html'],
[['.md', '/a/'], '/a/.html'],
[['foo/.md', '/a/'], '/a/foo/.html'],
[['/.md', '/a/'], '/.html'],
[['/foo/.md', '/a/'], '/foo/.html'],
[['.md', '/a/index.html'], '/a/.html'],
[['foo/.md', '/a/index.html'], '/a/foo/.html'],
[['/.md', '/a/index.html'], '/.html'],
[['/foo/.md', '/a/index.html'], '/foo/.html'],
[['.md', '/a/b.html'], '/a/.html'],
[['foo/.md', '/a/b.html'], '/a/foo/.html'],
[['/.md', '/a/b.html'], '/.html'],
[['/foo/.md', '/a/b.html'], '/foo/.html'],
]

describe('should normalize clean paths correctly', () => {
Expand Down

0 comments on commit 62af79c

Please sign in to comment.