AB#107240 added an export of the full test path URL so it doesnt have… - #11
Conversation
… to be done in the LTI tool
There was a problem hiding this comment.
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.
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.
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