@nestia/e2e 0.3.2 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,137 +1,137 @@
1
- /**
2
- * Dynamic Executor running prefixed functions.
3
- *
4
- * `DynamicExecutor` runs every prefixed functions in a specific directory.
5
- * However, if you want to run only specific functions, you can use
6
- * `--include` or `--exclude` option in the CLI (Command Line Interface) level.
7
- *
8
- * When you want to see example utilization cases, see the below example links.
9
- *
10
- * @example https://github.com/samchon/nestia-template/blob/master/src/test/index.ts
11
- * @example https://github.com/samchon/backend/blob/master/src/test/index.ts
12
- * @author Jeongho Nam - https://github.com/samchon
13
- */
14
- export declare namespace DynamicExecutor {
15
- /**
16
- * Function type of a prefixed.
17
- *
18
- * @template Arguments Type of parameters
19
- * @template Ret Type of return value
20
- */
21
- interface Closure<Arguments extends any[], Ret = any> {
22
- (...args: Arguments): Promise<Ret>;
23
- }
24
- /**
25
- * Options for dynamic executor.
26
- */
27
- interface IOptions<Parameters extends any[], Ret = any> {
28
- /**
29
- * Prefix of function name.
30
- *
31
- * Every prefixed function will be executed.
32
- *
33
- * In other words, if a function name doesn't start with the prefix, then it would never be executed.
34
- */
35
- prefix: string;
36
- /**
37
- * Get parameters of a function.
38
- *
39
- * @param name Function name
40
- * @returns Parameters
41
- */
42
- parameters: (name: string) => Parameters;
43
- /**
44
- * Filter function whether to run or not.
45
- *
46
- * @param name Function name
47
- * @returns Whether to run or not
48
- */
49
- filter?: (name: string) => boolean;
50
- /**
51
- * Wrapper of test function.
52
- *
53
- * If you specify this `wrapper` property, every dynamic functions
54
- * loaded and called by this `DynamicExecutor` would be wrapped by
55
- * the `wrapper` function.
56
- *
57
- * @param name Function name
58
- * @param closure Function to be executed
59
- * @returns Wrapper function
60
- */
61
- wrapper?: (name: string, closure: Closure<Parameters, Ret>) => Promise<any>;
62
- /**
63
- * Whether to show elapsed time on `console` or not.
64
- *
65
- * @default true
66
- */
67
- showElapsedTime?: boolean;
68
- /**
69
- * Extension of dynamic functions.
70
- *
71
- * @default js
72
- */
73
- extension?: string;
74
- }
75
- /**
76
- * Report, result of dynamic execution.
77
- */
78
- interface IReport {
79
- /**
80
- * Location path of dynamic functions.
81
- */
82
- location: string;
83
- /**
84
- * Execution results of dynamic functions.
85
- */
86
- executions: IReport.IExecution[];
87
- /**
88
- * Total elapsed time.
89
- */
90
- time: number;
91
- }
92
- namespace IReport {
93
- /**
94
- * Execution result of a dynamic function.
95
- */
96
- interface IExecution {
97
- /**
98
- * Name of function.
99
- */
100
- name: string;
101
- /**
102
- * Location path of the function.
103
- */
104
- location: string;
105
- /**
106
- * Error when occured.
107
- */
108
- error: Error | null;
109
- /**
110
- * Elapsed time.
111
- */
112
- time: number;
113
- }
114
- }
115
- /**
116
- * Prepare dynamic executor in strict mode.
117
- *
118
- * In strict mode, if any error occurs, the program will be terminated directly.
119
- * Otherwise, {@link validate} mode does not terminate when error occurs, but
120
- * just archive the error log.
121
- *
122
- * @param options Options of dynamic executor
123
- * @returns Runner of dynamic functions with specific location
124
- */
125
- const assert: <Arguments extends any[]>(options: IOptions<Arguments, any>) => (path: string) => Promise<IReport>;
126
- /**
127
- * Prepare dynamic executor in loose mode.
128
- *
129
- * In loose mode, the program would not be terminated even when error occurs.
130
- * Instead, the error would be archived and returns as a list. Otherwise,
131
- * {@link assert} mode terminates the program directly when error occurs.
132
- *
133
- * @param options Options of dynamic executor
134
- * @returns Runner of dynamic functions with specific location
135
- */
136
- const validate: <Arguments extends any[]>(options: IOptions<Arguments, any>) => (path: string) => Promise<IReport>;
137
- }
1
+ /**
2
+ * Dynamic Executor running prefixed functions.
3
+ *
4
+ * `DynamicExecutor` runs every prefixed functions in a specific directory.
5
+ * However, if you want to run only specific functions, you can use
6
+ * `--include` or `--exclude` option in the CLI (Command Line Interface) level.
7
+ *
8
+ * When you want to see example utilization cases, see the below example links.
9
+ *
10
+ * @example https://github.com/samchon/nestia-template/blob/master/src/test/index.ts
11
+ * @example https://github.com/samchon/backend/blob/master/src/test/index.ts
12
+ * @author Jeongho Nam - https://github.com/samchon
13
+ */
14
+ export declare namespace DynamicExecutor {
15
+ /**
16
+ * Function type of a prefixed.
17
+ *
18
+ * @template Arguments Type of parameters
19
+ * @template Ret Type of return value
20
+ */
21
+ interface Closure<Arguments extends any[], Ret = any> {
22
+ (...args: Arguments): Promise<Ret>;
23
+ }
24
+ /**
25
+ * Options for dynamic executor.
26
+ */
27
+ interface IOptions<Parameters extends any[], Ret = any> {
28
+ /**
29
+ * Prefix of function name.
30
+ *
31
+ * Every prefixed function will be executed.
32
+ *
33
+ * In other words, if a function name doesn't start with the prefix, then it would never be executed.
34
+ */
35
+ prefix: string;
36
+ /**
37
+ * Get parameters of a function.
38
+ *
39
+ * @param name Function name
40
+ * @returns Parameters
41
+ */
42
+ parameters: (name: string) => Parameters;
43
+ /**
44
+ * Filter function whether to run or not.
45
+ *
46
+ * @param name Function name
47
+ * @returns Whether to run or not
48
+ */
49
+ filter?: (name: string) => boolean;
50
+ /**
51
+ * Wrapper of test function.
52
+ *
53
+ * If you specify this `wrapper` property, every dynamic functions
54
+ * loaded and called by this `DynamicExecutor` would be wrapped by
55
+ * the `wrapper` function.
56
+ *
57
+ * @param name Function name
58
+ * @param closure Function to be executed
59
+ * @returns Wrapper function
60
+ */
61
+ wrapper?: (name: string, closure: Closure<Parameters, Ret>) => Promise<any>;
62
+ /**
63
+ * Whether to show elapsed time on `console` or not.
64
+ *
65
+ * @default true
66
+ */
67
+ showElapsedTime?: boolean;
68
+ /**
69
+ * Extension of dynamic functions.
70
+ *
71
+ * @default js
72
+ */
73
+ extension?: string;
74
+ }
75
+ /**
76
+ * Report, result of dynamic execution.
77
+ */
78
+ interface IReport {
79
+ /**
80
+ * Location path of dynamic functions.
81
+ */
82
+ location: string;
83
+ /**
84
+ * Execution results of dynamic functions.
85
+ */
86
+ executions: IReport.IExecution[];
87
+ /**
88
+ * Total elapsed time.
89
+ */
90
+ time: number;
91
+ }
92
+ namespace IReport {
93
+ /**
94
+ * Execution result of a dynamic function.
95
+ */
96
+ interface IExecution {
97
+ /**
98
+ * Name of function.
99
+ */
100
+ name: string;
101
+ /**
102
+ * Location path of the function.
103
+ */
104
+ location: string;
105
+ /**
106
+ * Error when occured.
107
+ */
108
+ error: Error | null;
109
+ /**
110
+ * Elapsed time.
111
+ */
112
+ time: number;
113
+ }
114
+ }
115
+ /**
116
+ * Prepare dynamic executor in strict mode.
117
+ *
118
+ * In strict mode, if any error occurs, the program will be terminated directly.
119
+ * Otherwise, {@link validate} mode does not terminate when error occurs, but
120
+ * just archive the error log.
121
+ *
122
+ * @param options Options of dynamic executor
123
+ * @returns Runner of dynamic functions with specific location
124
+ */
125
+ const assert: <Arguments extends any[]>(options: IOptions<Arguments, any>) => (path: string) => Promise<IReport>;
126
+ /**
127
+ * Prepare dynamic executor in loose mode.
128
+ *
129
+ * In loose mode, the program would not be terminated even when error occurs.
130
+ * Instead, the error would be archived and returns as a list. Otherwise,
131
+ * {@link assert} mode terminates the program directly when error occurs.
132
+ *
133
+ * @param options Options of dynamic executor
134
+ * @returns Runner of dynamic functions with specific location
135
+ */
136
+ const validate: <Arguments extends any[]>(options: IOptions<Arguments, any>) => (path: string) => Promise<IReport>;
137
+ }