feat: centralize process
This commit is contained in:
parent
5d7f90eb6d
commit
4c33ab960b
2 changed files with 51 additions and 11 deletions
|
|
@ -16,6 +16,19 @@ test("launch game", { timeout: 0 }, async () => {
|
|||
instance.setPaths(gameRoot);
|
||||
instance.setAuth(auth);
|
||||
|
||||
instance.on("progress", console.log)
|
||||
|
||||
await instance.install();
|
||||
await instance.launch();
|
||||
const p = await instance.launch();
|
||||
|
||||
p.stdout.on("data", (d: Buffer) => {
|
||||
console.log(d.toString());
|
||||
});
|
||||
|
||||
await new Promise((res) => {
|
||||
p.on("close", () => {
|
||||
console.log("closed");
|
||||
res(0);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue