test: avoid extra output (#19901)

This commit is contained in:
Alexander Akait 2025-09-18 15:41:17 +03:00 committed by GitHub
parent 480bb3b91d
commit 3799e931af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 5 deletions

View File

@ -1,5 +1,7 @@
import { react } from "./react";
function doNothing() {}
it("should work where an ESM entryChunk depends on the runtimeChunk", async function (done) {
const mainChunk = STATS_JSON.chunks.find((chunk) => chunk.id === "main");
const runtimeChunk = STATS_JSON.chunks.find((chunk) => chunk.id === "runtime-main");
@ -9,8 +11,8 @@ it("should work where an ESM entryChunk depends on the runtimeChunk", async func
expect(mainChunk).toBeDefined();
expect(react).toBe("react");
await import('./dynamic-1').then(console.log)
await import('./dynamic-2').then(console.log)
await import('./dynamic-1').then(doNothing)
await import('./dynamic-2').then(doNothing)
if (WATCH_STEP === "0") {
STATE.mainChunkHash = mainChunk.hash;

View File

@ -1,3 +1,5 @@
export var value = "1";
import("./dynamic-2").then(console.log)
function doNothing() {}
import("./dynamic-2").then(doNothing)

View File

@ -1,5 +1,7 @@
import { react } from "./react";
function doNothing() {}
it("should work where an ESM entryChunk depends on the runtimeChunk", async function (done) {
const mainChunk = STATS_JSON.chunks.find((chunk) => chunk.id === "main");
const runtimeChunk = STATS_JSON.chunks.find((chunk) => chunk.id === "runtime-main");
@ -9,8 +11,8 @@ it("should work where an ESM entryChunk depends on the runtimeChunk", async func
expect(mainChunk).toBeDefined();
expect(react).toBe("react");
await import('./dynamic-1').then(console.log)
await import('./dynamic-2').then(console.log)
await import('./dynamic-1').then(doNothing)
await import('./dynamic-2').then(doNothing)
if (WATCH_STEP === "0") {
STATE.mainChunkHash = mainChunk.hash;