User asked: 'arent mocks also related to testing?' — yes, but the mock plays two roles where the contract and factory play one each. §04 now opens with that framing. What's new: - Section title bumped to 'Mocks, contracts & factories' - New three-roles diagram at the top of §04 visualizing the chain: IArticlesRepository → MockArticlesRepository + ArticlesRepository → articlesRepositoryContract → articleFactory - Two ordered lists explaining the mock's dual job (DI default binding + direct test fake) and the contract/factory's single test-only roles - Three new expandable code examples: · the mock as DI binding (real BlogModule code) · the mock as direct test fake (use-case test, no container) · the contract running against both impls (proof-of-parity) - New CSS for .three-roles-diagram, .role-* boxes, .role-arrow with vertical connector lines, .role-jobs lists with counter-leading decimal numbering The existing Contracts and Factories cards stay in place below — they provide the deeper detail on each individual artifact.
Description
No description provided
Languages
TypeScript
65.6%
JavaScript
21.1%
Handlebars
12.2%
Shell
0.9%
Dockerfile
0.1%