Fix JavaScript tests: update tests to pass config via parameter#8238
Merged
Fix JavaScript tests: update tests to pass config via parameter#8238
Conversation
The tests were failing because the safe output handlers (create_discussion, update_issue, close_issue) were not reading configuration from environment variables, which is how the tests provide configuration. Changes: - update_runner.cjs: Read GH_AW_UPDATE_* environment variables for configuration - create_discussion.cjs: Read GH_AW_DISCUSSION_* environment variables for configuration - close_entity_helpers.cjs: Use existing parseEntityConfig to read GH_AW_CLOSE_* environment variables All 118 test files now pass with 2398 tests passing. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix JavaScript tests based on reference
Fix JavaScript tests: read safe output configuration from environment variables
Dec 31, 2025
Contributor
|
@copilot revert changes to the code files and update the tests instead to match the new behavior. |
As requested, reverted changes to the three code files (update_runner.cjs, create_discussion.cjs, close_entity_helpers.cjs) and instead updated the test files to pass configuration via the config parameter rather than environment variables. Test changes: - create_discussion.test.cjs: Pass title_prefix and category via config object - update_issue.test.cjs: Pass allow_title, allow_status, allow_body, and target via config object - close_issue.test.cjs: Pass target, required_title_prefix, and required_labels via config object All 118 test files pass (2398 tests). Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
Copilot
AI
changed the title
Fix JavaScript tests: read safe output configuration from environment variables
Fix JavaScript tests: update tests to pass config via parameter
Dec 31, 2025
pelikhan
approved these changes
Dec 31, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three safe output handler tests (
create_discussion.test.cjs,update_issue.test.cjs,close_issue.test.cjs) were failing after the JavaScript handler migration in #8234 because they were passing configuration via environment variables instead of using the config parameter.Changes
create_discussion.test.cjs: Updated to passtitle_prefixandcategoryvia config object parameterupdate_issue.test.cjs: Updated to passallow_title,allow_status,allow_body, andtargetvia config object parameterclose_issue.test.cjs: Updated to passtarget,required_title_prefix, andrequired_labelsvia config object parameterExample
All 118 test files now pass (2398 tests).
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.