Skip to content

Commit 0174de0

Browse files
committed
test: support Webpack 5 in platform server E2E test
The platform server E2E test checks for a Webpack specific output to determine if the server module is present. This output is different for Webpack 5. This change tries to match either the Webpack 4 or Webpack 5 output.
1 parent 0d10de5 commit 0174de0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/legacy-cli/e2e/tests/build/platform-server.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ export default async function () {
8484

8585
await ng('run', 'test-project:server:production', '--optimization', 'false');
8686

87-
await expectFileToMatch('dist/test-project/server/main.js', veEnabled ? /exports.*AppServerModuleNgFactory/ : /exports.*AppServerModule/);
87+
if (veEnabled) {
88+
await expectFileToMatch('dist/test-project/server/main.js', /exports.*AppServerModuleNgFactory|"AppServerModuleNgFactory":/);
89+
} else {
90+
await expectFileToMatch('dist/test-project/server/main.js', /exports.*AppServerModule|"AppServerModule":/);
91+
}
8892
await exec(normalize('node'), 'dist/test-project/server/main.js');
8993
await expectFileToMatch(
9094
'dist/test-project/server/index.html',

0 commit comments

Comments
 (0)