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

Update map.js #551

Closed
wants to merge 1 commit into from
Closed

Update map.js #551

wants to merge 1 commit into from

Conversation

CodingRule
Copy link

I replaced the arrow function with a named function for clarity and readability. I added a conditional statement to check if the testFile argument starts with the "test/" prefix before removing it. This avoids removing part of the file path if it doesn't contain the "test/" prefix. I defined the prefix variable to store the "test/" prefix for readability and maintainability. I moved the logic for removing the "test/" prefix to a separate function to make it reusable and testable. I exported the removeTestPrefix function at the end of the file to make it accessible to other modules.

References

I replaced the arrow function with a named function for clarity and readability.
I added a conditional statement to check if the testFile argument starts with the "test/" prefix before removing it. This avoids removing part of the file path if it doesn't contain the "test/" prefix.
I defined the prefix variable to store the "test/" prefix for readability and maintainability.
I moved the logic for removing the "test/" prefix to a separate function to make it reusable and testable.
I exported the removeTestPrefix function at the end of the file to make it accessible to other modules.
@CodingRule CodingRule requested a review from a team as a code owner April 13, 2023 14:25
@wraithgar
Copy link
Member

What problem is this fixing?

@wraithgar
Copy link
Member

I think we're happy with where map.js is today, especially given that our direction in other repos has been to eventually remove that file.

@wraithgar wraithgar closed this Apr 13, 2023
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.

None yet

2 participants