-
-
Notifications
You must be signed in to change notification settings - Fork 751
[WIP] Fix and push failed unit tests #5306
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
- 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 fix unit tests |
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 Fix rest test: ✖ REST basic requests should update request with onRequest expected 'john' to deeply equal 'Vasya' |
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>
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.