-
Notifications
You must be signed in to change notification settings - Fork 0
AB#107240 added an export of the full test path URL so it doesnt have… #11
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
Conversation
… to be done in the LTI tool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new utility function getTestUrl() to the deployment-test-utils package, which constructs and exports the full test path URL from environment variables CANVAS_HOST and DEPLOYMENT_TEST_PATH. This eliminates the need for consuming LTI tools to manually construct URLs, simplifying test setup.
Key Changes:
- Added URL normalization logic that trims whitespace and handles trailing/leading slashes consistently
- Exported a new
getTestUrl()function that returns the pre-computed URL orundefinedif the host is not set
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
I wonder whether it's worth writing these back to process.env for the runtime duration - that way you can still import process.env.CANVAS_HOST into tests and it will be normalized? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… to be done in the LTI tool