From 68e592363324a91b25dd91f487924284f112e7c9 Mon Sep 17 00:00:00 2001 From: Jeongho Nam Date: Wed, 10 Jul 2024 15:34:00 +0900 Subject: [PATCH] Bump up `@nestia/e2e` dependency. --- package.json | 7 ++++--- test/index.ts | 14 +++++++++++++- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 00e69d7..6999b09 100644 --- a/package.json +++ b/package.json @@ -38,14 +38,14 @@ "license": "ISC", "dependencies": { "@nestia/fetcher": "^3.5.0", - "@samchon/openapi": "^0.3.1", + "@samchon/openapi": "^0.3.4", "commander": "^10.0.0", "inquirer": "^8.2.5", "typia": "^6.4.3" }, "devDependencies": { "@nestia/core": "^3.5.0", - "@nestia/e2e": "^0.6.0", + "@nestia/e2e": "^0.7.0", "@nestia/sdk": "^3.5.0", "@nestjs/common": "^10.3.10", "@nestjs/core": "^10.3.10", @@ -56,12 +56,13 @@ "@types/inquirer": "^8.2.5", "@types/node": "^20.14.9", "@types/uuid": "^10.0.0", + "chalk": "^4.1.2", "nestia": "^5.3.1", "prettier": "^3.3.2", "rimraf": "^5.0.7", "rollup": "^4.18.0", "ts-patch": "^3.2.1", - "typescript": "5.5.2", + "typescript": "^5.5.3", "typescript-transform-paths": "^3.4.7", "uuid": "^10.0.0" }, diff --git a/test/index.ts b/test/index.ts index cc3e6ff..02e9c8c 100644 --- a/test/index.ts +++ b/test/index.ts @@ -5,6 +5,7 @@ import { OpenAiComposer, OpenAiTypeChecker, } from "@wrtnio/openai-function-schema"; +import chalk from "chalk"; import fs from "fs"; import typia from "typia"; @@ -41,13 +42,24 @@ const main = async (): Promise => { // DO TEST const report: DynamicExecutor.IReport = await DynamicExecutor.validate({ prefix: "test_", + location: __dirname + "/features", parameters: () => [ { connection: { host: `http://localhost:3000` }, swagger: typia.assert(swagger), } satisfies ITestProps, ], - })(__dirname + "/features"); + onComplete: (exec) => { + const trace = (str: string) => + console.log(` - ${chalk.green(exec.name)}: ${str}`); + if (exec.error === null) { + const elapsed: number = + new Date(exec.completed_at).getTime() - + new Date(exec.started_at).getTime(); + trace(`${chalk.yellow(elapsed.toLocaleString())} ms`); + } else trace(chalk.red(exec.error.name)); + }, + }); // REPORT EXCEPTIONS const exceptions: Error[] = report.executions