Skip to content

Commit aba8e05

Browse files
feat(enhanced): add comprehensive ProvideSharedPlugin test coverage
- Add 73 comprehensive tests for ProvideSharedPlugin core functionality - Implement complete test coverage for shouldProvideSharedModule method (15 tests) - Add provideSharedModule method tests with proper business logic validation (16 tests) - Implement module matching and resolution stage tests (20 tests) - Cover path classification, direct matching, prefix matching, layer logic - Add node_modules reconstruction and early return scenario tests - Fix container utils mock to support dependencyFactories operations - Add ConsumeSharedPlugin error handling and performance tests - Ensure all warning generation follows correct business rules: - include.request/exclude.request failures generate NO warnings - Only include.version/exclude.version failures generate warnings - Singleton warnings only for version filters - Validate correct map key usage (createLookupKeyForSharing with resource path) - Test complex filtering scenarios and edge cases comprehensively 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 95d0e12 commit aba8e05

File tree

5 files changed

+2359
-298
lines changed

5 files changed

+2359
-298
lines changed

INCREMENTAL_PR_PLAN_REVISED.md

Lines changed: 0 additions & 297 deletions
This file was deleted.

packages/enhanced/test/unit/container/utils.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,13 @@ export const createMockCompilation = () => {
4646
runtimeTemplate: mockRuntimeTemplate,
4747
moduleGraph: mockModuleGraph,
4848
chunkGraph: mockChunkGraph,
49-
dependencyFactories: new Map(),
49+
dependencyFactories: {
50+
set: jest.fn(),
51+
get: jest.fn(),
52+
has: jest.fn(),
53+
delete: jest.fn(),
54+
clear: jest.fn(),
55+
},
5056
dependencyTemplates: new Map(),
5157
addRuntimeModule: jest.fn(),
5258
contextDependencies: { addAll: jest.fn() },

0 commit comments

Comments
 (0)