feat: replace console.log with events

This commit is contained in:
HerozDotExe 2026-03-21 23:56:50 +01:00
parent 96bf0456a1
commit eb380f9403
10 changed files with 69 additions and 36 deletions

View file

@ -24,6 +24,9 @@ test("launch game", { timeout: 0, tags: ["full", "forge"] }, async () => {
});
instance.on("progress", console.log);
instance.on("log", (step, msg) => {
console.log(`[${step}] ${msg}`)
})
await instance.install();
const p = await instance.launch();

View file

@ -24,6 +24,9 @@ test("launch game", { timeout: 0, tags: ["full", "vanilla"] }, async () => {
});
instance.on("progress", console.log);
instance.on("log", (step, msg) => {
console.log(`[${step}] ${msg}`)
})
await instance.install();
const p = await instance.launch();

View file

@ -20,6 +20,9 @@ test("launch game", { timeout: 0, tags: ["full", "forge"] }, async () => {
});
instance.on("progress", console.log);
instance.on("log", (step, msg) => {
console.log(`[${step}] ${msg}`)
})
await instance.install();
const p = await instance.launch();

View file

@ -20,6 +20,9 @@ test("launch game", { timeout: 0, tags: ["full", "forge"] }, async () => {
});
instance.on("progress", console.log);
instance.on("log", (step, msg) => {
console.log(`[${step}] ${msg}`)
})
await instance.install();
const p = await instance.launch();