Skip to content

Commit a4152c5

Browse files
authored
fix(test): flaky test due to calling toJSON while hot updating (#12694)
1 parent 6ee0d4b commit a4152c5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/e2e/cases/make/remove-dynamic-entry-with-loader/index.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,7 @@ test('should compile', async ({ page, fileAction, rspack }) => {
1919
),
2020
);
2121

22-
await expect(async () => {
23-
await page.reload();
24-
expect(await page.locator('#index1').innerText()).toBe('index1 updated');
25-
}).toPass();
22+
await expect(page.locator('#index1')).toContainText('index1 updated');
2623

2724
await expect(page.locator('#index2')).toHaveCount(0);
2825
await expect(page.locator('#webpack-dev-server-client-overlay')).toHaveCount(

tests/e2e/cases/make/remove-dynamic-entry-with-loader/rspack.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ module.exports = {
2626
},
2727
context: __dirname,
2828
mode: 'development',
29+
optimization: {
30+
runtimeChunk: 'single',
31+
},
2932
plugins: [
3033
new rspack.HtmlRspackPlugin(),
3134
function (compiler) {

0 commit comments

Comments
 (0)