Skip to content

Commit 14d14cd

Browse files
committed
chore: wip
1 parent 0684e63 commit 14d14cd

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

test/build/cache/cache.test.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,16 +231,17 @@ describe("cache", () => {
231231
"--name",
232232
"graceful-exit-test",
233233
]);
234-
/* console.log(proc.pid) */
235234
proc.stdout.on("data", (chunk) => {
236235
const data = chunk.toString();
237-
expect(data).toContain(
238-
"Gracefully shutting down. To force exit, press ^C again. Please wait...",
239-
);
240236
if (data.includes("app.bundle.js")) {
241237
processKill(proc);
238+
return;
242239
}
240+
expect(data).toContain(
241+
"Gracefully shutting down. To force exit, press ^C again. Please wait...",
242+
);
243243
});
244+
244245
proc.on("exit", () => done());
245246
});
246247
});

test/build/cache/graceful-exit.webpack.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ const path = require("node:path");
22

33
class InfiniteWaitPlugin {
44
constructor(options = {}) {
5-
this.wait = options.wait || 200000;
5+
this.wait = options.wait || 10e3;
66
}
77

88
apply(compiler) {
99
compiler.hooks.done.tapPromise("Graceful Exit Test", async () => {
10-
await new Promise((res) => {
10+
// eslint-disable-next-line no-new
11+
new Promise((res) => {
1112
setTimeout(res, this.wait);
1213
});
1314
});

0 commit comments

Comments
 (0)