From 331a3c83abfab251fb6cebae6574e4fcb50b9670 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Tue, 15 Jul 2025 11:51:58 +0900 Subject: [PATCH] Report test result --- test/index.ts | 5 ++++- test/webpack.ts | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/test/index.ts b/test/index.ts index 89f6d41..4fdade7 100644 --- a/test/index.ts +++ b/test/index.ts @@ -1,3 +1,5 @@ +import { DynamicExecutor } from "@nestia/e2e"; + import { MyBackend } from "../src/MyBackend"; import { MyGlobal } from "../src/MyGlobal"; import { TestAutomation } from "./helpers/TestAutomation"; @@ -5,7 +7,7 @@ import { TestAutomationStdio } from "./helpers/TestAutomationStdio"; const main = async (): Promise => { MyGlobal.testing = true; - await TestAutomation.execute({ + const report: DynamicExecutor.IReport = await TestAutomation.execute({ open: async () => { const backend: MyBackend = new MyBackend(); await backend.open(); @@ -16,6 +18,7 @@ const main = async (): Promise => { onComplete: TestAutomationStdio.onComplete, onReset: TestAutomationStdio.onReset(new Date()), }); + TestAutomationStdio.report(report); }; main().catch((exp) => { console.log(exp); diff --git a/test/webpack.ts b/test/webpack.ts index b1612fc..c043f59 100644 --- a/test/webpack.ts +++ b/test/webpack.ts @@ -1,3 +1,4 @@ +import { DynamicExecutor } from "@nestia/e2e"; import cp from "child_process"; import { sleep_for } from "tstl"; @@ -18,7 +19,7 @@ const wait = async (): Promise => { const main = async (): Promise => { MyGlobal.testing = true; - await TestAutomation.execute({ + const report: DynamicExecutor.IReport = await TestAutomation.execute({ open: async () => { const backend: cp.ChildProcess = cp.fork( `${MyConfiguration.ROOT}/dist/server.js`, @@ -36,6 +37,7 @@ const main = async (): Promise => { onComplete: TestAutomationStdio.onComplete, onReset: TestAutomationStdio.onReset(new Date()), }); + TestAutomationStdio.report(report); }; main().catch((exp) => { console.log(exp);