Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit 7c575a7

Browse files
authored
Merge pull request #14 from wrtnio/features/optional
Bump up `@nestia/e2e` dependency.
2 parents 85252d3 + 68e5923 commit 7c575a7

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@
3838
"license": "ISC",
3939
"dependencies": {
4040
"@nestia/fetcher": "^3.5.0",
41-
"@samchon/openapi": "^0.3.1",
41+
"@samchon/openapi": "^0.3.4",
4242
"commander": "^10.0.0",
4343
"inquirer": "^8.2.5",
4444
"typia": "^6.4.3"
4545
},
4646
"devDependencies": {
4747
"@nestia/core": "^3.5.0",
48-
"@nestia/e2e": "^0.6.0",
48+
"@nestia/e2e": "^0.7.0",
4949
"@nestia/sdk": "^3.5.0",
5050
"@nestjs/common": "^10.3.10",
5151
"@nestjs/core": "^10.3.10",
@@ -56,12 +56,13 @@
5656
"@types/inquirer": "^8.2.5",
5757
"@types/node": "^20.14.9",
5858
"@types/uuid": "^10.0.0",
59+
"chalk": "^4.1.2",
5960
"nestia": "^5.3.1",
6061
"prettier": "^3.3.2",
6162
"rimraf": "^5.0.7",
6263
"rollup": "^4.18.0",
6364
"ts-patch": "^3.2.1",
64-
"typescript": "5.5.2",
65+
"typescript": "^5.5.3",
6566
"typescript-transform-paths": "^3.4.7",
6667
"uuid": "^10.0.0"
6768
},

test/index.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
OpenAiComposer,
66
OpenAiTypeChecker,
77
} from "@wrtnio/openai-function-schema";
8+
import chalk from "chalk";
89
import fs from "fs";
910
import typia from "typia";
1011

@@ -41,13 +42,24 @@ const main = async (): Promise<void> => {
4142
// DO TEST
4243
const report: DynamicExecutor.IReport = await DynamicExecutor.validate({
4344
prefix: "test_",
45+
location: __dirname + "/features",
4446
parameters: () => [
4547
{
4648
connection: { host: `http://localhost:3000` },
4749
swagger: typia.assert<ISwagger>(swagger),
4850
} satisfies ITestProps,
4951
],
50-
})(__dirname + "/features");
52+
onComplete: (exec) => {
53+
const trace = (str: string) =>
54+
console.log(` - ${chalk.green(exec.name)}: ${str}`);
55+
if (exec.error === null) {
56+
const elapsed: number =
57+
new Date(exec.completed_at).getTime() -
58+
new Date(exec.started_at).getTime();
59+
trace(`${chalk.yellow(elapsed.toLocaleString())} ms`);
60+
} else trace(chalk.red(exec.error.name));
61+
},
62+
});
5163

5264
// REPORT EXCEPTIONS
5365
const exceptions: Error[] = report.executions

0 commit comments

Comments
 (0)