mirror of https://github.com/webpack/webpack.git
test: avoid extra output (#19901)
This commit is contained in:
parent
480bb3b91d
commit
3799e931af
|
@ -1,5 +1,7 @@
|
||||||
import { react } from "./react";
|
import { react } from "./react";
|
||||||
|
|
||||||
|
function doNothing() {}
|
||||||
|
|
||||||
it("should work where an ESM entryChunk depends on the runtimeChunk", async function (done) {
|
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 mainChunk = STATS_JSON.chunks.find((chunk) => chunk.id === "main");
|
||||||
const runtimeChunk = STATS_JSON.chunks.find((chunk) => chunk.id === "runtime-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(mainChunk).toBeDefined();
|
||||||
expect(react).toBe("react");
|
expect(react).toBe("react");
|
||||||
|
|
||||||
await import('./dynamic-1').then(console.log)
|
await import('./dynamic-1').then(doNothing)
|
||||||
await import('./dynamic-2').then(console.log)
|
await import('./dynamic-2').then(doNothing)
|
||||||
|
|
||||||
if (WATCH_STEP === "0") {
|
if (WATCH_STEP === "0") {
|
||||||
STATE.mainChunkHash = mainChunk.hash;
|
STATE.mainChunkHash = mainChunk.hash;
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
export var value = "1";
|
export var value = "1";
|
||||||
|
|
||||||
import("./dynamic-2").then(console.log)
|
function doNothing() {}
|
||||||
|
|
||||||
|
import("./dynamic-2").then(doNothing)
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
import { react } from "./react";
|
import { react } from "./react";
|
||||||
|
|
||||||
|
function doNothing() {}
|
||||||
|
|
||||||
it("should work where an ESM entryChunk depends on the runtimeChunk", async function (done) {
|
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 mainChunk = STATS_JSON.chunks.find((chunk) => chunk.id === "main");
|
||||||
const runtimeChunk = STATS_JSON.chunks.find((chunk) => chunk.id === "runtime-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(mainChunk).toBeDefined();
|
||||||
expect(react).toBe("react");
|
expect(react).toBe("react");
|
||||||
|
|
||||||
await import('./dynamic-1').then(console.log)
|
await import('./dynamic-1').then(doNothing)
|
||||||
await import('./dynamic-2').then(console.log)
|
await import('./dynamic-2').then(doNothing)
|
||||||
|
|
||||||
if (WATCH_STEP === "0") {
|
if (WATCH_STEP === "0") {
|
||||||
STATE.mainChunkHash = mainChunk.hash;
|
STATE.mainChunkHash = mainChunk.hash;
|
||||||
|
|
Loading…
Reference in New Issue