Skip to content

Commit

Permalink
Merge pull request #30 from samchon/features/migrate
Browse files Browse the repository at this point in the history
Bump up `@nestia/e2e` version.
  • Loading branch information
samchon authored Jul 10, 2024
2 parents 6aafb7f + be2ef0f commit 2f611a6
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@samchon/openapi",
"version": "0.3.2",
"version": "0.3.3",
"description": "OpenAPI definitions and converters for 'typia' and 'nestia'.",
"main": "./lib/index.js",
"module": "./lib/index.mjs",
Expand Down Expand Up @@ -30,11 +30,12 @@
},
"homepage": "https://github.com/samchon/openapi",
"devDependencies": {
"@nestia/e2e": "^0.6.0",
"@nestia/e2e": "^0.7.0",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.6",
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
"@types/node": "^20.12.7",
"chalk": "^4.1.2",
"prettier": "^3.2.5",
"rimraf": "^5.0.5",
"rollup": "^4.18.1",
Expand Down
2 changes: 1 addition & 1 deletion src/IMigrateDocument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export namespace IMigrateDocument {
/**
* Target operation causing the error.
*/
operation: () => Operation;
operation?: () => Operation;

/**
* Method of the operation.
Expand Down
4 changes: 2 additions & 2 deletions src/IMigrateRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,15 @@ export interface IMigrateRoute<
* 5. Tag names are added with `@tag` tag.
* 6. If {@link OpenApi.IOperation.deprecated}, `@deprecated` tag is added.
*/
comment: () => string;
comment?: () => string;

/**
* Original operation from the OpenAPI document.
*
* The `operation` is a function returning the original
* {@link OpenApi.IOperation} from the {@link OpenAPI} document.
*/
operation: () => Operation;
operation?: () => Operation;
}
export namespace IMigrateRoute {
/**
Expand Down
14 changes: 13 additions & 1 deletion test/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
import { DynamicExecutor } from "@nestia/e2e";
import chalk from "chalk";

const main = async (): Promise<void> => {
// DO TEST
const report: DynamicExecutor.IReport = await DynamicExecutor.validate({
prefix: "test_",
location: __dirname + "/features",
parameters: () => [],
})(__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
Expand Down

0 comments on commit 2f611a6

Please sign in to comment.