Skip to content

Commit 331a3c8

Browse files
committed
Report test result
1 parent ba6970d commit 331a3c8

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

test/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
import { DynamicExecutor } from "@nestia/e2e";
2+
13
import { MyBackend } from "../src/MyBackend";
24
import { MyGlobal } from "../src/MyGlobal";
35
import { TestAutomation } from "./helpers/TestAutomation";
46
import { TestAutomationStdio } from "./helpers/TestAutomationStdio";
57

68
const main = async (): Promise<void> => {
79
MyGlobal.testing = true;
8-
await TestAutomation.execute({
10+
const report: DynamicExecutor.IReport = await TestAutomation.execute({
911
open: async () => {
1012
const backend: MyBackend = new MyBackend();
1113
await backend.open();
@@ -16,6 +18,7 @@ const main = async (): Promise<void> => {
1618
onComplete: TestAutomationStdio.onComplete,
1719
onReset: TestAutomationStdio.onReset(new Date()),
1820
});
21+
TestAutomationStdio.report(report);
1922
};
2023
main().catch((exp) => {
2124
console.log(exp);

test/webpack.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { DynamicExecutor } from "@nestia/e2e";
12
import cp from "child_process";
23
import { sleep_for } from "tstl";
34

@@ -18,7 +19,7 @@ const wait = async (): Promise<void> => {
1819

1920
const main = async (): Promise<void> => {
2021
MyGlobal.testing = true;
21-
await TestAutomation.execute({
22+
const report: DynamicExecutor.IReport = await TestAutomation.execute({
2223
open: async () => {
2324
const backend: cp.ChildProcess = cp.fork(
2425
`${MyConfiguration.ROOT}/dist/server.js`,
@@ -36,6 +37,7 @@ const main = async (): Promise<void> => {
3637
onComplete: TestAutomationStdio.onComplete,
3738
onReset: TestAutomationStdio.onReset(new Date()),
3839
});
40+
TestAutomationStdio.report(report);
3941
};
4042
main().catch((exp) => {
4143
console.log(exp);

0 commit comments

Comments
 (0)