-
-
Notifications
You must be signed in to change notification settings - Fork 8
Improve mock generation for fulfilledByType and mockOnly coexistence #250
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
Merged
Merged
Changes from all commits
Commits
Show all changes
72 commits
Select commit
Hold shift + click to select a range
de6cb56
Fall back to declared type in mock scope when fulfilledByType is not …
dfed 3ed3fc3
Add test for mockOnly coexisting with production fulfillingAdditional…
dfed 4e0eda9
Prefer mockOnly types in mock scope map for additional type slots
dfed 6452ce6
Refine mock scope map priority: non-mockOnly with mock wins over mock…
dfed 300712a
Allow mockOnly and production type with mock to coexist for same type
dfed 0c11529
Update duplicateMockProvider error message to reflect narrowed scope
dfed 47e74cd
Update manual: mockOnly no longer errors when production type has a mock
dfed 56a7d4a
Sort non-mockOnly first in mock scope map for deterministic priority
dfed 6c7900b
Move tests to correct files: success tests in mockOnly, error in errors
dfed 46183ec
curly
dfed 9da631b
Fix forwarded-child validation for fulfilledByType fallback path
dfed 2dbbdfa
Deduplicate map values by concreteInstantiable before building mock s…
dfed c9bfd09
Fix mock scope dedup to preserve all instantiableTypes across entries
dfed 076500e
Remove unreachable nil-coalescing fallback in mock scope map
dfed 3f4d14e
Fix two mockOnly merge bugs found by Codex review
dfed 221cb8c
Refactor: propagate mock info in resolveSafeDIFulfilledTypes, simplif…
dfed 551df60
Fix mock propagation overwriting generateMock, and duplicate mockOnly…
dfed 4c9a3f5
Fill remaining test matrix gaps for mockOnly + additional-type combin…
dfed bb0097f
Record existing mockOnly in (true, false) branch to fix order-depende…
dfed c56e67f
Clear stale mockOnly mock info when production type has generateMock
dfed f225bd3
Clear stale mockOnly entries for hand-written production mocks too
dfed a36e455
Rewrite hand-written mock tests with observable assertions
dfed 79828af
Improve mockOnly precedence documentation
dfed 66e41ec
Comprehensive test quality pass and scope map overwrite fix
dfed f582b51
Add stable tiebreaker to mock scope map sort
dfed a3d7566
Retrigger CI for codecov
dfed 2503b1c
Remove P1/P2 prefixes from test comments
dfed 6848f21
Remove duplicative test comments that restate the test name
dfed 8b136ba
Optimize stale mockOnly clearing to single pass
dfed 8d3d627
Inline stale mockOnly clearing into merge loop, eliminating second pass
dfed 04a656b
Update scope map comment to match actual overwrite condition
dfed a1305ea
Fix bare if-return style: add explicit else clauses in sort comparator
dfed 33e039a
Rename scopeByConcreteType to visitedConcreteTypeToScope for clarity
dfed 31db3bf
Fix stale mockOnly entries when mockOnly is processed before production
dfed a303362
Add CLAUDE.md guidance from mockOnly PR learnings
dfed 0378375
Fix test names, stale comments, and weak assertions from review
dfed 598b596
Hand-written mock takes priority over generateMock
dfed c89abb4
Update docs: hand-written mock priority over generateMock
dfed 7255586
fulfilledByType is production-only: mock resolution prefers declared …
dfed 594ad23
Rename test to accurately reflect mockOnly winning over no-mock produ…
dfed 53fdbc2
Rename fulfilledByType test to clarify fulfilling type has no mock
dfed e1b65d1
Rename: no mock (not just no mockOnly) triggers fulfilling type fallback
dfed 268aea6
Fix MyService to declare fulfillingAdditionalTypes for ServiceProtocol
dfed abe40e7
Fix invalid test inputs: production types must fulfill what they claim
dfed 18347ad
Error when production hand-written mock coexists with mockOnly
dfed f7425bf
Add ServiceProtocol conformance to MyService in mockOnly extra-additi…
dfed d6c7d0c
Allow different concrete types with mocks to coexist for same additio…
dfed ad52ba8
Update docs: hand-written mock + mockOnly now errors, not prioritizes
dfed 39475ca
Fix test: use protocol (not class) for fulfillingAdditionalTypes
dfed 74674c1
Test both orderings for hand-written mock + mockOnly error
dfed 320a149
Fix review findings: misplaced comment, abbreviations, misleading tes…
dfed 65a33c3
Restrict mock return type on concrete types; fix forwarded defaults r…
dfed c1e033f
Check slot type in scope map overwrite for extension mock return types
dfed ae3442b
Rename EService to ensure both error orderings are tested across CI runs
dfed 14c2a48
Fix forwarded defaults for extension mocks returning protocol types
dfed a90516e
Fix corrupted MockServiceA fixture from earlier replace_all
dfed a8beb0f
Fix bare if-throw style, inaccurate comment, and add invariant doc
dfed 6bfbf3b
Replace .contains() with full == assertions, fix test name and mark
dfed f8301a4
Review fixes: dead variable, comment placement, incoming mock compati…
dfed d1cda7a
Add test for mockOnly claiming multiple additional types with partial…
dfed 5ccd9e8
Restore extension mock returning protocol type test with known-issue …
dfed 98c58d7
Fix mockOnly extension with protocol return type causing duplicateMoc…
dfed f8d5ade
Fix SwiftFormat indentation in test file
dfed 8c5239a
Remove TODO comment and reference PR #251 for builderClosureType fix
dfed 72a2895
Remove stale comment referencing external PR
dfed cb099ab
Make error tests ordering-independent with same-file declarations
dfed 6bdcc8a
Fix mockOnly scope-reuse losing mock metadata for new additional-type…
dfed 572111c
Fix mockOnly merge to check against slot type, not concrete type
dfed f917ca3
Canonicalize mock root entry to concrete-type key
dfed c667a41
Add test verifying different-concrete mockOnly wins protocol slot
dfed 8b95b14
Make incompatible-merge tests ordering-independent
dfed 26dbd0a
Guard new mockOnly slots by return-type compatibility
dfed File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.