fix: log error when test failed
This commit is contained in:
parent
bb6bc1dfc7
commit
5b0bd8a73e
3 changed files with 12 additions and 4 deletions
|
|
@ -31,6 +31,10 @@ test("launch game", { timeout: 0 }, async () => {
|
|||
});
|
||||
|
||||
await new Promise<void>((res) => {
|
||||
p.on("error", (d: Buffer) => {
|
||||
console.log(d.toString());
|
||||
res();
|
||||
});
|
||||
p.on("close", () => {
|
||||
console.log("closed");
|
||||
res();
|
||||
|
|
|
|||
|
|
@ -31,6 +31,10 @@ test("launch game", { timeout: 0 }, async () => {
|
|||
});
|
||||
|
||||
await new Promise<void>((res) => {
|
||||
p.on("error", (d: Buffer) => {
|
||||
console.log(d.toString());
|
||||
res();
|
||||
});
|
||||
p.on("close", () => {
|
||||
console.log("closed");
|
||||
res();
|
||||
|
|
|
|||
|
|
@ -25,11 +25,11 @@ test("launch game", { timeout: 0 }, async () => {
|
|||
console.log(d.toString());
|
||||
});
|
||||
|
||||
p.on("error", (d: Buffer) => {
|
||||
console.log(d.toString());
|
||||
});
|
||||
|
||||
await new Promise<void>((res) => {
|
||||
p.on("error", (d: Buffer) => {
|
||||
console.log(d.toString());
|
||||
res();
|
||||
});
|
||||
p.on("close", () => {
|
||||
console.log("closed");
|
||||
res();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue