From de43af4403f74b000241525c26d117bd9610a585 Mon Sep 17 00:00:00 2001 From: Colum Ferry Date: Tue, 5 Nov 2024 17:49:31 +0000 Subject: [PATCH] chore(rspack): update e2e test --- e2e/rspack/tests/rspack.spec.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/e2e/rspack/tests/rspack.spec.ts b/e2e/rspack/tests/rspack.spec.ts index 0d629a14801a93..627cf0c1f26d2d 100644 --- a/e2e/rspack/tests/rspack.spec.ts +++ b/e2e/rspack/tests/rspack.spec.ts @@ -65,7 +65,11 @@ describe('rspack e2e', () => { }); expect(result).toContain('Successfully ran target build'); // Make sure expected files are present. - expect(listFiles(`dist/${project}`)).toHaveLength(5); + /** + * The files that are generated are: + * ["3rdpartylicenses.txt", "assets", "favicon.ico", "index.html", "main.bf7851e6.js", "runtime.e4294127.js"] + */ + expect(listFiles(`dist/${project}`)).toHaveLength(6); result = runCLI(`test ${project}`); expect(result).toContain('Successfully ran target test'); @@ -83,7 +87,7 @@ describe('rspack e2e', () => { env: { NODE_ENV: 'production' }, }); expect(result).toContain('Successfully ran target build'); - expect(listFiles(`dist/${project}`)).toHaveLength(5); // same length as before + expect(listFiles(`dist/${project}`)).toHaveLength(6); // same length as before // Generate a new app and check that the files are correct const app2 = uniq('app2'); @@ -116,7 +120,7 @@ describe('rspack e2e', () => { }); expect(result).toContain('Successfully ran target build'); // Make sure expected files are present. - expect(listFiles(`dist/${app2}`)).toHaveLength(5); + expect(listFiles(`dist/${app2}`)).toHaveLength(6); result = runCLI(`test ${app2}`); expect(result).toContain('Successfully ran target test');