Skip to content

Commit d44acbd

Browse files
chore(enhanced): add share plugin test
1 parent a5774c8 commit d44acbd

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

packages/enhanced/test/configCases/sharing/layers-share-plugin/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import './tests/different-layer.test';
22
import './tests/explicit.test';
3+
import './tests/unlayered.test';
34

45
// Test non-layered functionality
56
it('should provide and consume a normal library async in a separate shareScope', async () => {

packages/enhanced/test/configCases/sharing/layers-share-plugin/tests/different-layer.test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* Tests for modules shared with different-layer configuration
3+
*/
14
it('should provide and consume lib1 in different-layer', async () => {
25
const { default: value, layer } = await import('lib1');
36
expect(value).toBe('lib1');

packages/enhanced/test/configCases/sharing/layers-share-plugin/webpack.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,15 @@ module.exports = {
8282
version: '0',
8383
layer: 'required-layer',
8484
},
85+
lib4: {
86+
version: '1.0.0',
87+
requiredVersion: '^1.0.0',
88+
strictVersion: true,
89+
},
90+
'./relative3': {
91+
import: './relative3',
92+
version: false,
93+
},
8594
},
8695
}),
8796
],

0 commit comments

Comments
 (0)