Skip to content

Commit

Permalink
chore(rspack): update e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
Coly010 committed Nov 5, 2024
1 parent 6209f1e commit de43af4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions e2e/rspack/tests/rspack.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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');
Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit de43af4

Please sign in to comment.