chore: decouple expect matchers from parent src/ imports#40131
Merged
dgozman merged 1 commit intomicrosoft:mainfrom Apr 9, 2026
Merged
chore: decouple expect matchers from parent src/ imports#40131dgozman merged 1 commit intomicrosoft:mainfrom
dgozman merged 1 commit intomicrosoft:mainfrom
Conversation
pavelfeldman
reviewed
Apr 9, 2026
pavelfeldman
reviewed
Apr 9, 2026
pavelfeldman
approved these changes
Apr 9, 2026
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
591a051 to
67db9fe
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Reverse the dependency so matchers are self-contained: - Add ExpectTestInfo/ExpectStepInfo/ExpectStep interfaces in matchers/expect.ts - Inject config via setExpectConfig() from workerMain.ts - Move expectUtils.ts from @utils to @isomorphic - Move formatting helpers from expectUtils to matcherHint.ts - Inline addSuffixToFilePath and fileExistsAsync into matchers - Remove ../globals.ts and ../util.ts from matchers/DEPS.list - Move _deadlineForMatcher logic into matchers, expose _deadline() on TestInfo - Combine _hasNonRetriableError into _failWithError(error, 'shouldNotRetry')
67db9fe to
ce009c7
Compare
Contributor
Test results for "MCP"1 failed 6467 passed, 383 skipped Merge workflow run. |
Contributor
Test results for "tests 1"5 flaky39160 passed, 846 skipped Merge workflow run. |
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.
Summary
../globals,../util, or../common— reversed dependency viasetExpectConfig()injection fromworkerMain.tsExpectTestInfo/ExpectStepInfo/ExpectStepinterfaces so matchers don't depend onTestInfoImplexpectUtils.tsfrom@utilsto@isomorphic, keeping onlyserializeExpectedTextValuesmatcherHint.ts_deadlineForMatcherlogic into matchers, exposing_deadline()on TestInfo_hasNonRetriableErrorinto_failWithError(error, 'shouldNotRetry')