Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(shared): support relative links in normalizeRoutePath #1544

Merged
merged 10 commits into from
May 13, 2024

Conversation

Mister-Hope
Copy link
Member

No description provided.

@coveralls
Copy link

coveralls commented Apr 16, 2024

Pull Request Test Coverage Report for Build 9041425565

Details

  • 18 of 18 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.3%) to 41.942%

Totals Coverage Status
Change from base Build 8771023283: 0.3%
Covered Lines: 689
Relevant Lines: 1687

💛 - Coveralls

meteorlxy
meteorlxy previously approved these changes Apr 19, 2024
@meteorlxy meteorlxy dismissed their stale review April 19, 2024 06:02

test cases

[['.md'], '.html'],
[['foo/.md'], 'foo/.html'],
[['/.md'], '/.html'],
[['/foo/.md'], '/foo/.html'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still need cases with current for the last 5 lines

Copy link
Member Author

@Mister-Hope Mister-Hope Apr 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually don't think this is needed, These are corner cases which we are not expecting users to actually set them in production. I don't think those can be valid links

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are unexpected, but still should be covered by our unit tests

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For example, if a method is going to throw an error with unexpected input, we usually test it with expect().toThrow(). For this case, we don't throw errors, but we still need to be aware of those unexpected input.

@Mister-Hope
Copy link
Member Author

test added

@meteorlxy meteorlxy merged commit c443a95 into main May 13, 2024
21 checks passed
@meteorlxy meteorlxy deleted the normalizeRoutePath branch May 13, 2024 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants