@fincity/kirun-js 1.1.2 → 1.1.5
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/__tests__/engine/function/system/array/AddFirstTest.ts +29 -7
- package/__tests__/engine/function/system/array/AddTest.ts +21 -5
- package/__tests__/engine/function/system/array/BinarySearchTest.ts +26 -7
- package/__tests__/engine/function/system/array/CompareTest.ts +5 -1
- package/__tests__/engine/function/system/array/CopyTest.ts +22 -7
- package/__tests__/engine/function/system/array/DeleteFirstTest.ts +21 -5
- package/__tests__/engine/function/system/array/DeleteFromTest.ts +17 -4
- package/__tests__/engine/function/system/array/DeleteLastTest.ts +21 -5
- package/__tests__/engine/function/system/array/DeleteTest.ts +25 -6
- package/__tests__/engine/function/system/array/DisjointTest.ts +13 -3
- package/__tests__/engine/function/system/array/Equals.ts +13 -3
- package/__tests__/engine/function/system/array/FillTest.ts +5 -1
- package/__tests__/engine/function/system/array/FrequencyTest.ts +13 -3
- package/__tests__/engine/function/system/array/IndexOfArrayTest.ts +29 -7
- package/__tests__/engine/function/system/array/IndexOfTest.ts +21 -5
- package/__tests__/engine/function/system/array/InsertTest.ts +25 -6
- package/__tests__/engine/function/system/array/LastIndexOfArrayTest.ts +21 -5
- package/__tests__/engine/function/system/array/LastIndexOfTest.ts +25 -6
- package/__tests__/engine/function/system/array/MaxTest.ts +33 -24
- package/__tests__/engine/function/system/array/MinTest.ts +33 -24
- package/__tests__/engine/function/system/array/MisMatchTest.ts +17 -4
- package/__tests__/engine/function/system/array/ReverseTest.ts +21 -5
- package/__tests__/engine/function/system/array/RotateTest.ts +13 -3
- package/__tests__/engine/function/system/array/ShuffleTest.ts +9 -2
- package/__tests__/engine/function/system/array/SortTest.ts +21 -5
- package/__tests__/engine/function/system/array/SubArrayTest.ts +21 -5
- package/__tests__/engine/function/system/context/SetFunctionTest.ts +13 -3
- package/__tests__/engine/function/system/math/AddTest.ts +5 -3
- package/__tests__/engine/function/system/math/MathFunctionRepositoryTest.ts +108 -0
- package/__tests__/engine/function/system/math/MaximumTest.ts +38 -0
- package/__tests__/engine/function/system/math/MinimumTest.ts +38 -0
- package/__tests__/engine/function/system/math/RandomFloatTest.ts +83 -0
- package/__tests__/engine/function/system/math/RandomIntTest.ts +13 -5
- package/__tests__/engine/function/system/string/ConcatenateTest.ts +9 -2
- package/__tests__/engine/function/system/string/DeleteForGivenLengthTest.ts +9 -2
- package/__tests__/engine/function/system/string/InsertAtGivenPositionTest.ts +13 -3
- package/__tests__/engine/function/system/string/PostPadTest.ts +13 -3
- package/__tests__/engine/function/system/string/PrePadTest.ts +13 -3
- package/__tests__/engine/function/system/string/RegionMatchesTest.ts +13 -3
- package/__tests__/engine/function/system/string/ReverseTest.ts +10 -3
- package/__tests__/engine/function/system/string/SplitTest.ts +9 -2
- package/__tests__/engine/function/system/string/StringFunctionRepoTest2.ts +13 -3
- package/__tests__/engine/function/system/string/StringFunctionRepoTest3.ts +9 -2
- package/__tests__/engine/function/system/string/StringFunctionRepositoryTest.ts +33 -8
- package/__tests__/engine/function/system/string/ToStringTest.ts +10 -3
- package/__tests__/engine/function/system/string/TrimToTest.ts +9 -2
- package/__tests__/engine/json/schema/SchemaUtil.ts +3 -0
- package/__tests__/engine/json/schema/type/TypeUtilTest.ts +10 -0
- package/__tests__/engine/json/schema/validator/AnyOfAllOfOneOfValidatorTest.ts +38 -0
- package/__tests__/engine/json/schema/validator/SchemaValidatorTest.ts +67 -0
- package/__tests__/engine/runtime/KIRuntimeTest.ts +23 -12
- package/__tests__/engine/runtime/KIRuntimeWithDefinitionTest.ts +9 -10
- package/__tests__/engine/runtime/expression/ExpressionEvaluationTest.ts +5 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/module.js +1 -1
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +11 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/engine/function/AbstractFunction.ts +14 -5
- package/src/engine/function/system/math/Maximum.ts +1 -1
- package/src/engine/function/system/math/Minimum.ts +1 -1
- package/src/engine/function/system/math/RandomFloat.ts +2 -2
- package/src/engine/json/schema/Schema.ts +3 -3
- package/src/engine/json/schema/SchemaUtil.ts +4 -4
- package/src/engine/json/schema/type/TypeUtil.ts +3 -5
- package/src/engine/json/schema/validator/SchemaValidator.ts +4 -1
- package/src/engine/model/AbstractStatement.ts +10 -0
- package/src/engine/runtime/FunctionExecutionParameters.ts +48 -0
- package/src/engine/runtime/KIRuntime.ts +38 -24
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { Fill } from '../../../../../src/engine/function/system/array/Fill';
|
|
2
2
|
import { FunctionExecutionParameters } from '../../../../../src/engine/runtime/FunctionExecutionParameters';
|
|
3
3
|
import { MapUtil } from '../../../../../src/engine/util/MapUtil';
|
|
4
|
+
import { KIRunFunctionRepository, KIRunSchemaRepository } from '../../../../../src';
|
|
4
5
|
|
|
5
6
|
test('Fill Test', async () => {
|
|
6
7
|
let fill: Fill = new Fill();
|
|
7
8
|
|
|
8
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
9
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
10
|
+
new KIRunFunctionRepository(),
|
|
11
|
+
new KIRunSchemaRepository(),
|
|
12
|
+
);
|
|
9
13
|
let array = [0, 1];
|
|
10
14
|
|
|
11
15
|
fep.setArguments(MapUtil.of('source', array as any, 'element', 3));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Frequency } from '../../../../../src/engine/function/system/array/Frequency';
|
|
2
2
|
import { FunctionExecutionParameters } from '../../../../../src/engine/runtime/FunctionExecutionParameters';
|
|
3
|
+
import { KIRunFunctionRepository, KIRunSchemaRepository } from '../../../../../src';
|
|
3
4
|
|
|
4
5
|
let freq: Frequency = new Frequency();
|
|
5
6
|
|
|
@@ -22,7 +23,10 @@ test('freq test 1', async () => {
|
|
|
22
23
|
array.push('Driven');
|
|
23
24
|
array.push('developement');
|
|
24
25
|
|
|
25
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
26
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
27
|
+
new KIRunFunctionRepository(),
|
|
28
|
+
new KIRunSchemaRepository(),
|
|
29
|
+
).setArguments(
|
|
26
30
|
new Map<string, any>([
|
|
27
31
|
[Frequency.PARAMETER_ARRAY_SOURCE.getParameterName(), array],
|
|
28
32
|
[Frequency.PARAMETER_ANY.getParameterName(), 'I'],
|
|
@@ -55,7 +59,10 @@ test('freq test 2', async () => {
|
|
|
55
59
|
array.push('Driven');
|
|
56
60
|
array.push('developement');
|
|
57
61
|
|
|
58
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
62
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
63
|
+
new KIRunFunctionRepository(),
|
|
64
|
+
new KIRunSchemaRepository(),
|
|
65
|
+
);
|
|
59
66
|
|
|
60
67
|
fep.setArguments(
|
|
61
68
|
new Map<string, any>([
|
|
@@ -82,7 +89,10 @@ test('freq test 2', async () => {
|
|
|
82
89
|
|
|
83
90
|
test('freq test 3', async () => {
|
|
84
91
|
let array: any[] = [];
|
|
85
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
92
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
93
|
+
new KIRunFunctionRepository(),
|
|
94
|
+
new KIRunSchemaRepository(),
|
|
95
|
+
).setArguments(
|
|
86
96
|
new Map<string, any>([
|
|
87
97
|
[Frequency.PARAMETER_ARRAY_SOURCE.getParameterName(), array],
|
|
88
98
|
[Frequency.PARAMETER_ANY.getParameterName(), 'I'],
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IndexOfArray } from '../../../../../src/engine/function/system/array/IndexOfArray';
|
|
2
2
|
import { FunctionExecutionParameters } from '../../../../../src/engine/runtime/FunctionExecutionParameters';
|
|
3
|
+
import { KIRunFunctionRepository, KIRunSchemaRepository } from '../../../../../src';
|
|
3
4
|
|
|
4
5
|
let ioa: IndexOfArray = new IndexOfArray();
|
|
5
6
|
|
|
@@ -20,7 +21,10 @@ test('index of array 1', async () => {
|
|
|
20
21
|
res.push('c');
|
|
21
22
|
res.push('d');
|
|
22
23
|
|
|
23
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
24
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
25
|
+
new KIRunFunctionRepository(),
|
|
26
|
+
new KIRunSchemaRepository(),
|
|
27
|
+
).setArguments(
|
|
24
28
|
new Map<string, any>([
|
|
25
29
|
[IndexOfArray.PARAMETER_ARRAY_SOURCE.getParameterName(), arr],
|
|
26
30
|
[IndexOfArray.PARAMETER_ARRAY_SECOND_SOURCE.getParameterName(), res],
|
|
@@ -54,7 +58,10 @@ test('Index of array 2', async () => {
|
|
|
54
58
|
res.push('e');
|
|
55
59
|
res.push('d');
|
|
56
60
|
|
|
57
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
61
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
62
|
+
new KIRunFunctionRepository(),
|
|
63
|
+
new KIRunSchemaRepository(),
|
|
64
|
+
).setArguments(
|
|
58
65
|
new Map<string, any>([
|
|
59
66
|
[IndexOfArray.PARAMETER_ARRAY_SOURCE.getParameterName(), arr],
|
|
60
67
|
[IndexOfArray.PARAMETER_ARRAY_SECOND_SOURCE.getParameterName(), res],
|
|
@@ -150,7 +157,10 @@ test('index of array 3', async () => {
|
|
|
150
157
|
res.push(array1);
|
|
151
158
|
res.push(array4);
|
|
152
159
|
|
|
153
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
160
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
161
|
+
new KIRunFunctionRepository(),
|
|
162
|
+
new KIRunSchemaRepository(),
|
|
163
|
+
).setArguments(
|
|
154
164
|
new Map<string, any>([
|
|
155
165
|
[IndexOfArray.PARAMETER_ARRAY_SOURCE.getParameterName(), arr],
|
|
156
166
|
[IndexOfArray.PARAMETER_ARRAY_SECOND_SOURCE.getParameterName(), res],
|
|
@@ -183,7 +193,10 @@ test('index of array test 4', async () => {
|
|
|
183
193
|
res.push('e');
|
|
184
194
|
res.push('d');
|
|
185
195
|
|
|
186
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
196
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
197
|
+
new KIRunFunctionRepository(),
|
|
198
|
+
new KIRunSchemaRepository(),
|
|
199
|
+
).setArguments(
|
|
187
200
|
new Map<string, any>([
|
|
188
201
|
[IndexOfArray.PARAMETER_ARRAY_SOURCE.getParameterName(), arr],
|
|
189
202
|
[IndexOfArray.PARAMETER_ARRAY_SECOND_SOURCE.getParameterName(), res],
|
|
@@ -215,7 +228,10 @@ test('index of array 5', async () => {
|
|
|
215
228
|
as.push('c');
|
|
216
229
|
as.push('e');
|
|
217
230
|
|
|
218
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
231
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
232
|
+
new KIRunFunctionRepository(),
|
|
233
|
+
new KIRunSchemaRepository(),
|
|
234
|
+
).setArguments(
|
|
219
235
|
new Map<string, any>([
|
|
220
236
|
[IndexOfArray.PARAMETER_ARRAY_SOURCE.getParameterName(), arr],
|
|
221
237
|
[IndexOfArray.PARAMETER_ARRAY_SECOND_SOURCE.getParameterName(), as],
|
|
@@ -235,7 +251,10 @@ test('index of array 6', async () => {
|
|
|
235
251
|
arr.push('b');
|
|
236
252
|
arr.push('c');
|
|
237
253
|
|
|
238
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
254
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
255
|
+
new KIRunFunctionRepository(),
|
|
256
|
+
new KIRunSchemaRepository(),
|
|
257
|
+
).setArguments(
|
|
239
258
|
new Map<string, any>([
|
|
240
259
|
[IndexOfArray.PARAMETER_ARRAY_SOURCE.getParameterName(), arr],
|
|
241
260
|
[IndexOfArray.PARAMETER_ARRAY_SECOND_SOURCE.getParameterName(), undefined],
|
|
@@ -324,7 +343,10 @@ test('index of array 3', async () => {
|
|
|
324
343
|
res.push(array1);
|
|
325
344
|
res.push(array4);
|
|
326
345
|
|
|
327
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
346
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
347
|
+
new KIRunFunctionRepository(),
|
|
348
|
+
new KIRunSchemaRepository(),
|
|
349
|
+
).setArguments(
|
|
328
350
|
new Map<string, any>([
|
|
329
351
|
[IndexOfArray.PARAMETER_ARRAY_SOURCE.getParameterName(), arr],
|
|
330
352
|
[IndexOfArray.PARAMETER_ARRAY_SECOND_SOURCE.getParameterName(), res],
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IndexOf } from '../../../../../src/engine/function/system/array/IndexOf';
|
|
2
2
|
import { FunctionExecutionParameters } from '../../../../../src/engine/runtime/FunctionExecutionParameters';
|
|
3
|
+
import { KIRunFunctionRepository, KIRunSchemaRepository } from '../../../../../src';
|
|
3
4
|
|
|
4
5
|
test('Index of Test 1', async () => {
|
|
5
6
|
let ind: IndexOf = new IndexOf();
|
|
@@ -25,7 +26,10 @@ test('Index of Test 1', async () => {
|
|
|
25
26
|
|
|
26
27
|
let find: string = 'with';
|
|
27
28
|
|
|
28
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
29
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
30
|
+
new KIRunFunctionRepository(),
|
|
31
|
+
new KIRunSchemaRepository(),
|
|
32
|
+
).setArguments(
|
|
29
33
|
new Map<string, any>([
|
|
30
34
|
[IndexOf.PARAMETER_ARRAY_SOURCE.getParameterName(), array],
|
|
31
35
|
[IndexOf.PARAMETER_ANY_NOT_NULL.getParameterName(), find],
|
|
@@ -64,7 +68,10 @@ test('Index of Test 2', async () => {
|
|
|
64
68
|
|
|
65
69
|
let find: string = 'with';
|
|
66
70
|
|
|
67
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
71
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
72
|
+
new KIRunFunctionRepository(),
|
|
73
|
+
new KIRunSchemaRepository(),
|
|
74
|
+
).setArguments(
|
|
68
75
|
new Map<string, any>([
|
|
69
76
|
[IndexOf.PARAMETER_ARRAY_SOURCE.getParameterName(), array],
|
|
70
77
|
[IndexOf.PARAMETER_ANY_NOT_NULL.getParameterName(), find],
|
|
@@ -110,7 +117,10 @@ test('Index of Test 3', async () => {
|
|
|
110
117
|
|
|
111
118
|
let find: string = 'witah';
|
|
112
119
|
|
|
113
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
120
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
121
|
+
new KIRunFunctionRepository(),
|
|
122
|
+
new KIRunSchemaRepository(),
|
|
123
|
+
).setArguments(
|
|
114
124
|
new Map<string, any>([
|
|
115
125
|
[IndexOf.PARAMETER_ARRAY_SOURCE.getParameterName(), array],
|
|
116
126
|
[IndexOf.PARAMETER_ANY_NOT_NULL.getParameterName(), find],
|
|
@@ -203,7 +213,10 @@ test('Index of Test 4', async () => {
|
|
|
203
213
|
|
|
204
214
|
let find: any = array;
|
|
205
215
|
|
|
206
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
216
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
217
|
+
new KIRunFunctionRepository(),
|
|
218
|
+
new KIRunSchemaRepository(),
|
|
219
|
+
).setArguments(
|
|
207
220
|
new Map<string, any>([
|
|
208
221
|
[IndexOf.PARAMETER_ARRAY_SOURCE.getParameterName(), arr],
|
|
209
222
|
[IndexOf.PARAMETER_ANY_NOT_NULL.getParameterName(), find],
|
|
@@ -255,7 +268,10 @@ test('indexof test 5', async () => {
|
|
|
255
268
|
let arr: any[] = [js1, js2, js1, js3, js3, js4, js1];
|
|
256
269
|
let find: any = js4;
|
|
257
270
|
|
|
258
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
271
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
272
|
+
new KIRunFunctionRepository(),
|
|
273
|
+
new KIRunSchemaRepository(),
|
|
274
|
+
).setArguments(
|
|
259
275
|
new Map<string, any>([
|
|
260
276
|
[IndexOf.PARAMETER_ARRAY_SOURCE.getParameterName(), arr],
|
|
261
277
|
[IndexOf.PARAMETER_ANY_NOT_NULL.getParameterName(), find],
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Insert } from '../../../../../src/engine/function/system/array/Insert';
|
|
2
2
|
import { FunctionExecutionParameters } from '../../../../../src/engine/runtime/FunctionExecutionParameters';
|
|
3
|
+
import { KIRunFunctionRepository, KIRunSchemaRepository } from '../../../../../src';
|
|
3
4
|
|
|
4
5
|
test('Insert of Test 1', async () => {
|
|
5
6
|
let ins: Insert = new Insert();
|
|
@@ -23,7 +24,10 @@ test('Insert of Test 1', async () => {
|
|
|
23
24
|
array.push('Driven');
|
|
24
25
|
array.push('developement');
|
|
25
26
|
|
|
26
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
27
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
28
|
+
new KIRunFunctionRepository(),
|
|
29
|
+
new KIRunSchemaRepository(),
|
|
30
|
+
)
|
|
27
31
|
.setArguments(
|
|
28
32
|
new Map<string, any>([
|
|
29
33
|
[Insert.PARAMETER_ARRAY_SOURCE.getParameterName(), array],
|
|
@@ -73,7 +77,10 @@ test('Insert of Test 2', async () => {
|
|
|
73
77
|
arr.push(7);
|
|
74
78
|
arr.push(8);
|
|
75
79
|
|
|
76
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
80
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
81
|
+
new KIRunFunctionRepository(),
|
|
82
|
+
new KIRunSchemaRepository(),
|
|
83
|
+
)
|
|
77
84
|
.setArguments(
|
|
78
85
|
new Map<string, any>([
|
|
79
86
|
[Insert.PARAMETER_ARRAY_SOURCE.getParameterName(), arr],
|
|
@@ -114,7 +121,10 @@ test('Insert of Test 3', async () => {
|
|
|
114
121
|
arr.push(7);
|
|
115
122
|
arr.push(8);
|
|
116
123
|
|
|
117
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
124
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
125
|
+
new KIRunFunctionRepository(),
|
|
126
|
+
new KIRunSchemaRepository(),
|
|
127
|
+
)
|
|
118
128
|
.setArguments(
|
|
119
129
|
new Map<string, any>([
|
|
120
130
|
[Insert.PARAMETER_ARRAY_SOURCE.getParameterName(), arr],
|
|
@@ -155,7 +165,10 @@ test('Insert of Test 4', async () => {
|
|
|
155
165
|
arr.push(7);
|
|
156
166
|
arr.push(8);
|
|
157
167
|
|
|
158
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
168
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
169
|
+
new KIRunFunctionRepository(),
|
|
170
|
+
new KIRunSchemaRepository(),
|
|
171
|
+
)
|
|
159
172
|
.setArguments(
|
|
160
173
|
new Map<string, any>([
|
|
161
174
|
[Insert.PARAMETER_ARRAY_SOURCE.getParameterName(), arr],
|
|
@@ -188,7 +201,10 @@ test('Insert of Test 5', async () => {
|
|
|
188
201
|
|
|
189
202
|
let arr: any[] = [];
|
|
190
203
|
|
|
191
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
204
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
205
|
+
new KIRunFunctionRepository(),
|
|
206
|
+
new KIRunSchemaRepository(),
|
|
207
|
+
)
|
|
192
208
|
.setArguments(
|
|
193
209
|
new Map<string, any>([
|
|
194
210
|
[Insert.PARAMETER_ARRAY_SOURCE.getParameterName(), arr],
|
|
@@ -210,7 +226,10 @@ test('Insert of Test 5', async () => {
|
|
|
210
226
|
test('Insert of Test 6', async () => {
|
|
211
227
|
let ins: Insert = new Insert();
|
|
212
228
|
|
|
213
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
229
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
230
|
+
new KIRunFunctionRepository(),
|
|
231
|
+
new KIRunSchemaRepository(),
|
|
232
|
+
)
|
|
214
233
|
.setArguments(
|
|
215
234
|
new Map<string, any>([
|
|
216
235
|
[Insert.PARAMETER_ARRAY_SOURCE.getParameterName(), null],
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LastIndexOfArray } from '../../../../../src/engine/function/system/array/LastIndexOfArray';
|
|
2
2
|
import { FunctionExecutionParameters } from '../../../../../src/engine/runtime/FunctionExecutionParameters';
|
|
3
|
+
import { KIRunFunctionRepository, KIRunSchemaRepository } from '../../../../../src';
|
|
3
4
|
|
|
4
5
|
let larr: LastIndexOfArray = new LastIndexOfArray();
|
|
5
6
|
|
|
@@ -24,7 +25,10 @@ test('Last Index of array Test 1', async () => {
|
|
|
24
25
|
res.push('c');
|
|
25
26
|
res.push('d');
|
|
26
27
|
|
|
27
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
28
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
29
|
+
new KIRunFunctionRepository(),
|
|
30
|
+
new KIRunSchemaRepository(),
|
|
31
|
+
).setArguments(
|
|
28
32
|
new Map<string, any>([
|
|
29
33
|
[LastIndexOfArray.PARAMETER_ARRAY_SOURCE.getParameterName(), array],
|
|
30
34
|
[LastIndexOfArray.PARAMETER_ARRAY_SECOND_SOURCE.getParameterName(), res],
|
|
@@ -57,7 +61,10 @@ test('last index of array test 2', async () => {
|
|
|
57
61
|
res.push('b');
|
|
58
62
|
res.push('d');
|
|
59
63
|
|
|
60
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
64
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
65
|
+
new KIRunFunctionRepository(),
|
|
66
|
+
new KIRunSchemaRepository(),
|
|
67
|
+
).setArguments(
|
|
61
68
|
new Map<string, any>([
|
|
62
69
|
[LastIndexOfArray.PARAMETER_ARRAY_SOURCE.getParameterName(), arr],
|
|
63
70
|
[LastIndexOfArray.PARAMETER_ARRAY_SECOND_SOURCE.getParameterName(), res],
|
|
@@ -88,7 +95,10 @@ test('last index of array test 3', async () => {
|
|
|
88
95
|
arr.push('c');
|
|
89
96
|
arr.push('d');
|
|
90
97
|
|
|
91
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
98
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
99
|
+
new KIRunFunctionRepository(),
|
|
100
|
+
new KIRunSchemaRepository(),
|
|
101
|
+
).setArguments(
|
|
92
102
|
new Map<string, any>([
|
|
93
103
|
[LastIndexOfArray.PARAMETER_ARRAY_SOURCE.getParameterName(), arr],
|
|
94
104
|
[LastIndexOfArray.PARAMETER_ARRAY_SECOND_SOURCE.getParameterName(), undefined],
|
|
@@ -98,7 +108,10 @@ test('last index of array test 3', async () => {
|
|
|
98
108
|
|
|
99
109
|
await expect(larr.execute(fep)).rejects.toThrow();
|
|
100
110
|
|
|
101
|
-
let fep1: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
111
|
+
let fep1: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
112
|
+
new KIRunFunctionRepository(),
|
|
113
|
+
new KIRunSchemaRepository(),
|
|
114
|
+
).setArguments(
|
|
102
115
|
new Map<string, any>([
|
|
103
116
|
[LastIndexOfArray.PARAMETER_ARRAY_SOURCE.getParameterName(), null],
|
|
104
117
|
[LastIndexOfArray.PARAMETER_ARRAY_SECOND_SOURCE.getParameterName(), undefined],
|
|
@@ -193,7 +206,10 @@ test('last index of array test 4', async () => {
|
|
|
193
206
|
res.push(array1);
|
|
194
207
|
res.push(array4);
|
|
195
208
|
|
|
196
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
209
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
210
|
+
new KIRunFunctionRepository(),
|
|
211
|
+
new KIRunSchemaRepository(),
|
|
212
|
+
).setArguments(
|
|
197
213
|
new Map<string, any>([
|
|
198
214
|
[LastIndexOfArray.PARAMETER_ARRAY_SOURCE.getParameterName(), arr],
|
|
199
215
|
[LastIndexOfArray.PARAMETER_ARRAY_SECOND_SOURCE.getParameterName(), res],
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LastIndexOf } from '../../../../../src/engine/function/system/array/LastIndexOf';
|
|
2
2
|
import { FunctionExecutionParameters } from '../../../../../src/engine/runtime/FunctionExecutionParameters';
|
|
3
|
+
import { KIRunFunctionRepository, KIRunSchemaRepository } from '../../../../../src';
|
|
3
4
|
|
|
4
5
|
test('Last Index of Test 1', async () => {
|
|
5
6
|
let lind: LastIndexOf = new LastIndexOf();
|
|
@@ -25,7 +26,10 @@ test('Last Index of Test 1', async () => {
|
|
|
25
26
|
|
|
26
27
|
let find: string = 'test';
|
|
27
28
|
|
|
28
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
29
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
30
|
+
new KIRunFunctionRepository(),
|
|
31
|
+
new KIRunSchemaRepository(),
|
|
32
|
+
).setArguments(
|
|
29
33
|
new Map<string, any>([
|
|
30
34
|
[LastIndexOf.PARAMETER_ARRAY_SOURCE.getParameterName(), array],
|
|
31
35
|
[LastIndexOf.PARAMETER_ANY_NOT_NULL.getParameterName(), find],
|
|
@@ -64,7 +68,10 @@ test('Last Index of Test 2', async () => {
|
|
|
64
68
|
|
|
65
69
|
let find;
|
|
66
70
|
|
|
67
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
71
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
72
|
+
new KIRunFunctionRepository(),
|
|
73
|
+
new KIRunSchemaRepository(),
|
|
74
|
+
).setArguments(
|
|
68
75
|
new Map<string, any>([
|
|
69
76
|
[LastIndexOf.PARAMETER_ARRAY_SOURCE.getParameterName(), array],
|
|
70
77
|
[LastIndexOf.PARAMETER_ANY_NOT_NULL.getParameterName(), find],
|
|
@@ -98,7 +105,10 @@ test('Last Index of Test 3', async () => {
|
|
|
98
105
|
|
|
99
106
|
let find;
|
|
100
107
|
|
|
101
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
108
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
109
|
+
new KIRunFunctionRepository(),
|
|
110
|
+
new KIRunSchemaRepository(),
|
|
111
|
+
).setArguments(
|
|
102
112
|
new Map<string, any>([
|
|
103
113
|
[LastIndexOf.PARAMETER_ARRAY_SOURCE.getParameterName(), null],
|
|
104
114
|
[LastIndexOf.PARAMETER_ANY_NOT_NULL.getParameterName(), find],
|
|
@@ -132,7 +142,10 @@ test('Last Index of Test 4', async () => {
|
|
|
132
142
|
|
|
133
143
|
let find: string = 'developement';
|
|
134
144
|
|
|
135
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
145
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
146
|
+
new KIRunFunctionRepository(),
|
|
147
|
+
new KIRunSchemaRepository(),
|
|
148
|
+
).setArguments(
|
|
136
149
|
new Map<string, any>([
|
|
137
150
|
[LastIndexOf.PARAMETER_ARRAY_SOURCE.getParameterName(), array],
|
|
138
151
|
[LastIndexOf.PARAMETER_ANY_NOT_NULL.getParameterName(), find],
|
|
@@ -185,7 +198,10 @@ test('Last Index of Test 5', async () => {
|
|
|
185
198
|
|
|
186
199
|
let find = 'changes';
|
|
187
200
|
|
|
188
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
201
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
202
|
+
new KIRunFunctionRepository(),
|
|
203
|
+
new KIRunSchemaRepository(),
|
|
204
|
+
).setArguments(
|
|
189
205
|
new Map<string, any>([
|
|
190
206
|
[LastIndexOf.PARAMETER_ARRAY_SOURCE.getParameterName(), array],
|
|
191
207
|
[LastIndexOf.PARAMETER_ANY_NOT_NULL.getParameterName(), find],
|
|
@@ -237,7 +253,10 @@ test('Last Index of Test 6', async () => {
|
|
|
237
253
|
arr.push(js1);
|
|
238
254
|
arr.push(js1);
|
|
239
255
|
|
|
240
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
256
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
257
|
+
new KIRunFunctionRepository(),
|
|
258
|
+
new KIRunSchemaRepository(),
|
|
259
|
+
).setArguments(
|
|
241
260
|
new Map<string, any>([
|
|
242
261
|
[LastIndexOf.PARAMETER_ARRAY_SOURCE.getParameterName(), arr],
|
|
243
262
|
[LastIndexOf.PARAMETER_ANY_NOT_NULL.getParameterName(), js4],
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Max } from '../../../../../src/engine/function/system/array/Max';
|
|
2
2
|
import { FunctionExecutionParameters } from '../../../../../src/engine/runtime/FunctionExecutionParameters';
|
|
3
|
+
import { KIRunFunctionRepository, KIRunSchemaRepository } from '../../../../../src';
|
|
3
4
|
|
|
4
5
|
let max: Max = new Max();
|
|
5
6
|
|
|
@@ -8,9 +9,10 @@ test('max test 1 ', async () => {
|
|
|
8
9
|
arr.push(null);
|
|
9
10
|
arr.push(12);
|
|
10
11
|
|
|
11
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
12
|
-
new
|
|
13
|
-
|
|
12
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
13
|
+
new KIRunFunctionRepository(),
|
|
14
|
+
new KIRunSchemaRepository(),
|
|
15
|
+
).setArguments(new Map([[Max.PARAMETER_ARRAY_SOURCE_PRIMITIVE.getParameterName(), arr]]));
|
|
14
16
|
|
|
15
17
|
expect(
|
|
16
18
|
(await max.execute(fep)).allResults()[0].getResult().get(Max.EVENT_RESULT_ANY.getName()),
|
|
@@ -20,9 +22,10 @@ test('max test 1 ', async () => {
|
|
|
20
22
|
test('max test 2 ', async () => {
|
|
21
23
|
let arr: any[] = [];
|
|
22
24
|
|
|
23
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
24
|
-
new
|
|
25
|
-
|
|
25
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
26
|
+
new KIRunFunctionRepository(),
|
|
27
|
+
new KIRunSchemaRepository(),
|
|
28
|
+
).setArguments(new Map([[Max.PARAMETER_ARRAY_SOURCE_PRIMITIVE.getParameterName(), arr]]));
|
|
26
29
|
|
|
27
30
|
await expect(max.execute(fep)).rejects.toThrow();
|
|
28
31
|
});
|
|
@@ -35,9 +38,10 @@ test('max test 3', async () => {
|
|
|
35
38
|
arr.push(98);
|
|
36
39
|
arr.push(1);
|
|
37
40
|
|
|
38
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
39
|
-
new
|
|
40
|
-
|
|
41
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
42
|
+
new KIRunFunctionRepository(),
|
|
43
|
+
new KIRunSchemaRepository(),
|
|
44
|
+
).setArguments(new Map([[Max.PARAMETER_ARRAY_SOURCE_PRIMITIVE.getParameterName(), arr]]));
|
|
41
45
|
expect((await max.execute(fep)).allResults()[0].getResult().get('output')).toBe(98);
|
|
42
46
|
});
|
|
43
47
|
|
|
@@ -46,16 +50,18 @@ test('Max test 4', async () => {
|
|
|
46
50
|
arr.push('nocode');
|
|
47
51
|
arr.push('NoCode');
|
|
48
52
|
arr.push('platform');
|
|
49
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
50
|
-
new
|
|
51
|
-
|
|
53
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
54
|
+
new KIRunFunctionRepository(),
|
|
55
|
+
new KIRunSchemaRepository(),
|
|
56
|
+
).setArguments(new Map([[Max.PARAMETER_ARRAY_SOURCE_PRIMITIVE.getParameterName(), arr]]));
|
|
52
57
|
expect((await max.execute(fep)).allResults()[0].getResult().get('output')).toBe('platform');
|
|
53
58
|
});
|
|
54
59
|
|
|
55
60
|
test('Max test 6', async () => {
|
|
56
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
57
|
-
new
|
|
58
|
-
|
|
61
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
62
|
+
new KIRunFunctionRepository(),
|
|
63
|
+
new KIRunSchemaRepository(),
|
|
64
|
+
).setArguments(new Map([[Max.PARAMETER_ARRAY_SOURCE_PRIMITIVE.getParameterName(), null]]));
|
|
59
65
|
await expect(max.execute(fep)).rejects.toThrow();
|
|
60
66
|
});
|
|
61
67
|
|
|
@@ -69,9 +75,10 @@ test('Max test 5', async () => {
|
|
|
69
75
|
arr.push('platform');
|
|
70
76
|
arr.push(123);
|
|
71
77
|
|
|
72
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
73
|
-
new
|
|
74
|
-
|
|
78
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
79
|
+
new KIRunFunctionRepository(),
|
|
80
|
+
new KIRunSchemaRepository(),
|
|
81
|
+
).setArguments(new Map([[Max.PARAMETER_ARRAY_SOURCE_PRIMITIVE.getParameterName(), arr]]));
|
|
75
82
|
expect((await max.execute(fep)).allResults()[0].getResult().get('output')).toBe('platform');
|
|
76
83
|
});
|
|
77
84
|
|
|
@@ -81,18 +88,20 @@ test('Max test 7', async () => {
|
|
|
81
88
|
arr1.push('r');
|
|
82
89
|
arr1.push('d');
|
|
83
90
|
arr1.push('s');
|
|
84
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
85
|
-
new
|
|
86
|
-
|
|
91
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
92
|
+
new KIRunFunctionRepository(),
|
|
93
|
+
new KIRunSchemaRepository(),
|
|
94
|
+
).setArguments(new Map([[Max.PARAMETER_ARRAY_SOURCE_PRIMITIVE.getParameterName(), arr1]]));
|
|
87
95
|
|
|
88
96
|
expect((await max.execute(fep)).allResults()[0].getResult().get('output')).toBe('s');
|
|
89
97
|
});
|
|
90
98
|
|
|
91
99
|
test('Max test 8', async () => {
|
|
92
100
|
let arr: any[] = ['surendhar'];
|
|
93
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
94
|
-
new
|
|
95
|
-
|
|
101
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
102
|
+
new KIRunFunctionRepository(),
|
|
103
|
+
new KIRunSchemaRepository(),
|
|
104
|
+
).setArguments(new Map([[Max.PARAMETER_ARRAY_SOURCE_PRIMITIVE.getParameterName(), arr]]));
|
|
96
105
|
|
|
97
106
|
expect((await max.execute(fep)).allResults()[0].getResult().get('output')).toBe('surendhar');
|
|
98
107
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Min } from '../../../../../src/engine/function/system/array/Min';
|
|
2
2
|
import { FunctionExecutionParameters } from '../../../../../src/engine/runtime/FunctionExecutionParameters';
|
|
3
|
+
import { KIRunFunctionRepository, KIRunSchemaRepository } from '../../../../../src';
|
|
3
4
|
|
|
4
5
|
let min: Min = new Min();
|
|
5
6
|
|
|
@@ -8,9 +9,10 @@ test('min test 1 ', async () => {
|
|
|
8
9
|
arr.push(null);
|
|
9
10
|
arr.push(12);
|
|
10
11
|
|
|
11
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
12
|
-
new
|
|
13
|
-
|
|
12
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
13
|
+
new KIRunFunctionRepository(),
|
|
14
|
+
new KIRunSchemaRepository(),
|
|
15
|
+
).setArguments(new Map([[Min.PARAMETER_ARRAY_SOURCE.getParameterName(), arr]]));
|
|
14
16
|
|
|
15
17
|
expect(
|
|
16
18
|
(await min.execute(fep)).allResults()[0].getResult().get(Min.EVENT_RESULT_ANY.getName()),
|
|
@@ -20,9 +22,10 @@ test('min test 1 ', async () => {
|
|
|
20
22
|
test('min test 2 ', async () => {
|
|
21
23
|
let arr: any[] = [];
|
|
22
24
|
|
|
23
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
24
|
-
new
|
|
25
|
-
|
|
25
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
26
|
+
new KIRunFunctionRepository(),
|
|
27
|
+
new KIRunSchemaRepository(),
|
|
28
|
+
).setArguments(new Map([[Min.PARAMETER_ARRAY_SOURCE.getParameterName(), arr]]));
|
|
26
29
|
|
|
27
30
|
await expect(min.execute(fep)).rejects.toThrow();
|
|
28
31
|
});
|
|
@@ -35,9 +38,10 @@ test('min test 3', async () => {
|
|
|
35
38
|
arr.push(98);
|
|
36
39
|
arr.push(1);
|
|
37
40
|
|
|
38
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
39
|
-
new
|
|
40
|
-
|
|
41
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
42
|
+
new KIRunFunctionRepository(),
|
|
43
|
+
new KIRunSchemaRepository(),
|
|
44
|
+
).setArguments(new Map([[Min.PARAMETER_ARRAY_SOURCE.getParameterName(), arr]]));
|
|
41
45
|
expect((await min.execute(fep)).allResults()[0].getResult().get('output')).toBe(1);
|
|
42
46
|
});
|
|
43
47
|
|
|
@@ -47,16 +51,18 @@ test('min test 4', async () => {
|
|
|
47
51
|
arr.push('NoCode');
|
|
48
52
|
arr.push('platform');
|
|
49
53
|
|
|
50
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
51
|
-
new
|
|
52
|
-
|
|
54
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
55
|
+
new KIRunFunctionRepository(),
|
|
56
|
+
new KIRunSchemaRepository(),
|
|
57
|
+
).setArguments(new Map([[Min.PARAMETER_ARRAY_SOURCE.getParameterName(), arr]]));
|
|
53
58
|
expect((await min.execute(fep)).allResults()[0].getResult().get('output')).toBe('NoCode');
|
|
54
59
|
});
|
|
55
60
|
|
|
56
61
|
test('min test 5', async () => {
|
|
57
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
58
|
-
new
|
|
59
|
-
|
|
62
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
63
|
+
new KIRunFunctionRepository(),
|
|
64
|
+
new KIRunSchemaRepository(),
|
|
65
|
+
).setArguments(new Map([[Min.PARAMETER_ARRAY_SOURCE.getParameterName(), null]]));
|
|
60
66
|
await expect(min.execute(fep)).rejects.toThrow();
|
|
61
67
|
});
|
|
62
68
|
|
|
@@ -71,9 +77,10 @@ test('min test 6', async () => {
|
|
|
71
77
|
arr.push(123);
|
|
72
78
|
arr.push(1);
|
|
73
79
|
|
|
74
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
75
|
-
new
|
|
76
|
-
|
|
80
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
81
|
+
new KIRunFunctionRepository(),
|
|
82
|
+
new KIRunSchemaRepository(),
|
|
83
|
+
).setArguments(new Map([[Min.PARAMETER_ARRAY_SOURCE.getParameterName(), arr]]));
|
|
77
84
|
expect((await min.execute(fep)).allResults()[0].getResult().get('output')).toBe(1);
|
|
78
85
|
});
|
|
79
86
|
|
|
@@ -83,17 +90,19 @@ test('min test 7', async () => {
|
|
|
83
90
|
arr1.push('r');
|
|
84
91
|
arr1.push('d');
|
|
85
92
|
arr1.push('s');
|
|
86
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
87
|
-
new
|
|
88
|
-
|
|
93
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
94
|
+
new KIRunFunctionRepository(),
|
|
95
|
+
new KIRunSchemaRepository(),
|
|
96
|
+
).setArguments(new Map([[Min.PARAMETER_ARRAY_SOURCE.getParameterName(), arr1]]));
|
|
89
97
|
|
|
90
98
|
expect((await min.execute(fep)).allResults()[0].getResult().get('output')).toBe('c');
|
|
91
99
|
});
|
|
92
100
|
|
|
93
101
|
test('min test 8', async () => {
|
|
94
102
|
let arr: any[] = ['surendhar'];
|
|
95
|
-
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
96
|
-
new
|
|
97
|
-
|
|
103
|
+
let fep: FunctionExecutionParameters = new FunctionExecutionParameters(
|
|
104
|
+
new KIRunFunctionRepository(),
|
|
105
|
+
new KIRunSchemaRepository(),
|
|
106
|
+
).setArguments(new Map([[Min.PARAMETER_ARRAY_SOURCE.getParameterName(), arr]]));
|
|
98
107
|
expect((await min.execute(fep)).allResults()[0].getResult().get('output')).toBe('surendhar');
|
|
99
108
|
});
|