Skip to content

Commit 088d643

Browse files
committed
test(rsc-mf): guard modern config callback wiring boundaries
1 parent 88fdf16 commit 088d643

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

tests/integration/rsc-mf/tests/index.test.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,14 @@ function runTests({ mode }: TestConfig) {
518518
path.join(hostDir, 'module-federation.config.ts'),
519519
'utf-8',
520520
);
521+
const hostModernConfigSource = fs.readFileSync(
522+
path.join(hostDir, 'modern.config.ts'),
523+
'utf-8',
524+
);
525+
const remoteModernConfigSource = fs.readFileSync(
526+
path.join(remoteDir, 'modern.config.ts'),
527+
'utf-8',
528+
);
521529
const remoteExposeEntries = getRemoteExposeEntries(
522530
moduleFederationConfigSource,
523531
);
@@ -592,6 +600,12 @@ function runTests({ mode }: TestConfig) {
592600
expect(hostModuleFederationConfigSource).not.toContain(
593601
'initServerCallback',
594602
);
603+
expect(hostModernConfigSource).not.toContain('preEntry');
604+
expect(hostModernConfigSource).not.toContain('registerServerCallback');
605+
expect(remoteModernConfigSource).not.toContain('chunkLoadingGlobal');
606+
expect(remoteModernConfigSource).toContain(
607+
'rsc-mf-react-server-dom-client-browser$',
608+
);
595609
});
596610

597611
it('should not load callback helper expose chunk', () => {

0 commit comments

Comments
 (0)