@nestia/e2e 8.1.0 → 9.0.0-dev.20251107
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.
- package/LICENSE +21 -21
- package/README.md +93 -93
- package/package.json +3 -3
- package/src/ArrayUtil.ts +320 -320
- package/src/DynamicExecutor.ts +274 -274
- package/src/GaffComparator.ts +287 -287
- package/src/MapUtil.ts +86 -86
- package/src/RandomGenerator.ts +490 -490
- package/src/TestValidator.ts +635 -635
- package/src/index.ts +4 -4
- package/src/internal/json_equal_to.ts +35 -35
- package/src/module.ts +7 -7
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as e2e from "./module";
|
|
2
|
-
|
|
3
|
-
export default e2e;
|
|
4
|
-
export * from "./module";
|
|
1
|
+
import * as e2e from "./module";
|
|
2
|
+
|
|
3
|
+
export default e2e;
|
|
4
|
+
export * from "./module";
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
export const json_equal_to =
|
|
2
|
-
(exception: (key: string) => boolean) =>
|
|
3
|
-
<T>(x: T) =>
|
|
4
|
-
(y: T | null | undefined): string[] => {
|
|
5
|
-
const container: string[] = [];
|
|
6
|
-
const iterate =
|
|
7
|
-
(accessor: string) =>
|
|
8
|
-
(x: any) =>
|
|
9
|
-
(y: any): void => {
|
|
10
|
-
if (typeof x === "function" || typeof y === "function") return;
|
|
11
|
-
else if (typeof x !== typeof y) container.push(accessor);
|
|
12
|
-
else if (x instanceof Array)
|
|
13
|
-
if (!(y instanceof Array)) container.push(accessor);
|
|
14
|
-
else array(accessor)(x)(y);
|
|
15
|
-
else if (x instanceof Object) object(accessor)(x)(y);
|
|
16
|
-
else if (x !== y) container.push(accessor);
|
|
17
|
-
};
|
|
18
|
-
const array =
|
|
19
|
-
(accessor: string) =>
|
|
20
|
-
(x: any[]) =>
|
|
21
|
-
(y: any[]): void => {
|
|
22
|
-
if (x.length !== y.length) container.push(`${accessor}.length`);
|
|
23
|
-
x.forEach((xItem, i) => iterate(`${accessor}[${i}]`)(xItem)(y[i]));
|
|
24
|
-
};
|
|
25
|
-
const object =
|
|
26
|
-
(accessor: string) =>
|
|
27
|
-
(x: any) =>
|
|
28
|
-
(y: any): void =>
|
|
29
|
-
Object.keys(x)
|
|
30
|
-
.filter((key) => x[key] !== undefined && !exception(key))
|
|
31
|
-
.forEach((key) => iterate(`${accessor}.${key}`)(x[key])(y[key]));
|
|
32
|
-
|
|
33
|
-
iterate("")(x)(y);
|
|
34
|
-
return container;
|
|
35
|
-
};
|
|
1
|
+
export const json_equal_to =
|
|
2
|
+
(exception: (key: string) => boolean) =>
|
|
3
|
+
<T>(x: T) =>
|
|
4
|
+
(y: T | null | undefined): string[] => {
|
|
5
|
+
const container: string[] = [];
|
|
6
|
+
const iterate =
|
|
7
|
+
(accessor: string) =>
|
|
8
|
+
(x: any) =>
|
|
9
|
+
(y: any): void => {
|
|
10
|
+
if (typeof x === "function" || typeof y === "function") return;
|
|
11
|
+
else if (typeof x !== typeof y) container.push(accessor);
|
|
12
|
+
else if (x instanceof Array)
|
|
13
|
+
if (!(y instanceof Array)) container.push(accessor);
|
|
14
|
+
else array(accessor)(x)(y);
|
|
15
|
+
else if (x instanceof Object) object(accessor)(x)(y);
|
|
16
|
+
else if (x !== y) container.push(accessor);
|
|
17
|
+
};
|
|
18
|
+
const array =
|
|
19
|
+
(accessor: string) =>
|
|
20
|
+
(x: any[]) =>
|
|
21
|
+
(y: any[]): void => {
|
|
22
|
+
if (x.length !== y.length) container.push(`${accessor}.length`);
|
|
23
|
+
x.forEach((xItem, i) => iterate(`${accessor}[${i}]`)(xItem)(y[i]));
|
|
24
|
+
};
|
|
25
|
+
const object =
|
|
26
|
+
(accessor: string) =>
|
|
27
|
+
(x: any) =>
|
|
28
|
+
(y: any): void =>
|
|
29
|
+
Object.keys(x)
|
|
30
|
+
.filter((key) => x[key] !== undefined && !exception(key))
|
|
31
|
+
.forEach((key) => iterate(`${accessor}.${key}`)(x[key])(y[key]));
|
|
32
|
+
|
|
33
|
+
iterate("")(x)(y);
|
|
34
|
+
return container;
|
|
35
|
+
};
|
package/src/module.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from "./ArrayUtil";
|
|
2
|
-
export * from "./MapUtil";
|
|
3
|
-
export * from "./RandomGenerator";
|
|
4
|
-
|
|
5
|
-
export * from "./DynamicExecutor";
|
|
6
|
-
export * from "./GaffComparator";
|
|
7
|
-
export * from "./TestValidator";
|
|
1
|
+
export * from "./ArrayUtil";
|
|
2
|
+
export * from "./MapUtil";
|
|
3
|
+
export * from "./RandomGenerator";
|
|
4
|
+
|
|
5
|
+
export * from "./DynamicExecutor";
|
|
6
|
+
export * from "./GaffComparator";
|
|
7
|
+
export * from "./TestValidator";
|