Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan committed Aug 5, 2024
1 parent 98b2621 commit bb4fff9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions e2e/cases/html/custom-filename/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@ import { build, globContentJSON } from '@e2e/helper';
import { expect, test } from '@playwright/test';

test('should allow to custom HTML filename', async () => {
const rsbuild = await build({
await build({
cwd: __dirname,
});

const outputs = await globContentJSON(join(__dirname, 'dist'));
expect(outputs[join(rsbuild.distPath, 'custom-foo.html')]).toBeTruthy();
expect(outputs[join(rsbuild.distPath, 'custom-bar.html')]).toBeTruthy();
const fooFile = Object.keys(outputs).find((item) =>
item.includes('custom-foo.html'),
);
const barFile = Object.keys(outputs).find((item) =>
item.includes('custom-bar.html'),
);
expect(fooFile).toBeTruthy();
expect(barFile).toBeTruthy();
});

0 comments on commit bb4fff9

Please sign in to comment.