[WIP] Fix and push failed unit tests#5306
Merged
kobenguyent merged 4 commits intofix-bugfrom Nov 16, 2025
Merged
Conversation
- Fixed Workers#_initWorkers to pass test root directory instead of config file path - Fixed 'should create worker by function' test to configure helpers via options - Fixed helper configurations in other worker tests - Test now passes consistently (483 passed, 5 failed, 16 skipped)
Copilot stopped work on behalf of
kobenguyent due to an error
November 16, 2025 07:29
Collaborator
|
@copilot fix unit tests |
Contributor
Author
Fixed the remaining actionable unit test failure. The Container.append test now passes. Changes in commit 5a0edca:
Test results:
|
Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
Copilot stopped work on behalf of
kobenguyent due to an error
November 16, 2025 13:01
Collaborator
|
@copilot Fix rest test: ✖ REST basic requests should update request with onRequest expected 'john' to deeply equal 'Vasya' |
Contributor
Author
Fixed the REST test. The issue was that the REST helper only checked Changes in commit 84fd55e:
|
Co-authored-by: kobenguyent <7845001+kobenguyent@users.noreply.github.com>
Copilot stopped work on behalf of
kobenguyent due to an error
November 16, 2025 15:28
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.
Fix Failed Unit Tests
Changes Made
Workers#_initWorkersto pass test root directory instead of config file pathshould create worker by functiontest to configure helpers via optionsContainer.appendto properly merge support objectsSummary
1. Fixed worker test configuration
Fixed the failing unit test "Workers should create worker by function" with two key changes:
Fixed test root path bug in
lib/workers.js: Changed_initWorkersmethod to passgetTestRoot(config.testConfig)instead ofconfig.testConfigtocreateWorkerObjects. This ensures workers receive the correct test root directory instead of the config file path.Fixed test configuration in
test/unit/worker_test.js: Updated the test to pass helper configuration viaoptions.overridein the worker config. This is necessary because workers are not created untilrun()is called when using function-based grouping.Fixed helper mappings: Corrected helper require paths to properly load both
WorkersandCustomWorkershelpers from the correct files.2. Fixed Container.append proxy issue
Fixed the failing unit test "Container #append should be able to add new support object":
proxySupportConfigtracking: Store the original config used to createproxySupportproxy3. Fixed REST helper onRequest/onResponse
Fixed the failing test "REST basic requests should update request with onRequest":
this.options.onRequest/onResponseandthis.config.onRequest/onResponseI.config.onRequestbut the helper only checkedthis.options.onRequest, causing the callback to be ignoredTest Results
Remaining Failures
The 4 remaining failures are environmental/expected:
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.