clientnode 4.0.1477 → 4.0.1479
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/dist/bundle/index.js +2809 -1378
- package/dist/compatible/test-helper.js +190 -20
- package/dist/test-helper.d.ts +109 -7
- package/dist/test-helper.js +190 -20
- package/dist/type.d.ts +6 -0
- package/package.json +19 -8
- package/readme.md +12 -7
- package/dist/bundle/Lock.js +0 -85
- package/dist/bundle/Logger.js +0 -711
- package/dist/bundle/Semaphore.js +0 -74
- package/dist/bundle/array.js +0 -656
- package/dist/bundle/cli.js +0 -58
- package/dist/bundle/constants.js +0 -200
- package/dist/bundle/context.js +0 -224
- package/dist/bundle/cookie.js +0 -240
- package/dist/bundle/data-transfer.js +0 -747
- package/dist/bundle/datetime.js +0 -1073
- package/dist/bundle/domNode.js +0 -477
- package/dist/bundle/expression/evaluators.js +0 -1137
- package/dist/bundle/expression/helper.js +0 -115
- package/dist/bundle/expression/index.js +0 -1259
- package/dist/bundle/expression/indicator-functions.js +0 -220
- package/dist/bundle/expression/type.js +0 -16
- package/dist/bundle/filesystem.js +0 -373
- package/dist/bundle/function.js +0 -114
- package/dist/bundle/indicators.js +0 -467
- package/dist/bundle/module.js +0 -168
- package/dist/bundle/number.js +0 -433
- package/dist/bundle/object.js +0 -1027
- package/dist/bundle/process.js +0 -230
- package/dist/bundle/property-types.js +0 -36
- package/dist/bundle/scope.js +0 -1997
- package/dist/bundle/string.js +0 -1137
- package/dist/bundle/test-helper.js +0 -663
- package/dist/bundle/type.js +0 -16
- package/dist/bundle/utility.js +0 -354
package/dist/test-helper.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { AnyFunction, FirstParameter, FunctionTestTuple, FunctionTestPromiseTuple, FunctionTestPromiseRejectionTuple, TestMatchers as Matchers, TestSymbol, ThenParameter, UnknownFunction, FunctionTestAgainstResolvedPromiseTuple, FunctionTestPromiseAgainstResolvedPromiseTuple, FunctionTestPromiseRejectionAgainstResolvedPromiseTuple } from './type';
|
|
2
2
|
export declare const TEST_DEFINED_SYMBOL: unique symbol;
|
|
3
3
|
export declare const TEST_THROW_SYMBOL: unique symbol;
|
|
4
4
|
export declare const TEST_UNDEFINED_SYMBOL: unique symbol;
|
|
@@ -25,6 +25,21 @@ export declare const testEach: {
|
|
|
25
25
|
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestTuple<FunctionType>>): void;
|
|
26
26
|
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestTuple<FunctionType>>): void;
|
|
27
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* Tests each given test set (promise resolving to expected value follows by
|
|
30
|
+
* various list of function parameters). It respects function signature to
|
|
31
|
+
* raise compile time errors if given test set does not match given function
|
|
32
|
+
* signature.
|
|
33
|
+
* @param functionName - Function description to test.
|
|
34
|
+
* @param callback - Function reference to test.
|
|
35
|
+
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
36
|
+
* function again.
|
|
37
|
+
*/
|
|
38
|
+
export declare const testEachAgainstResolvedPromise: {
|
|
39
|
+
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestAgainstResolvedPromiseTuple<FunctionType>>): void;
|
|
40
|
+
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestAgainstResolvedPromiseTuple<FunctionType>>): void;
|
|
41
|
+
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestAgainstResolvedPromiseTuple<FunctionType>>): void;
|
|
42
|
+
};
|
|
28
43
|
/**
|
|
29
44
|
* Tests each given test set (expected value follows by various list of
|
|
30
45
|
* function parameters). It respects function signature to raise compile time
|
|
@@ -34,7 +49,7 @@ export declare const testEach: {
|
|
|
34
49
|
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
35
50
|
* function again.
|
|
36
51
|
*/
|
|
37
|
-
export declare const
|
|
52
|
+
export declare const testEachResolvedPromise: {
|
|
38
53
|
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseTuple<FunctionType>>): void;
|
|
39
54
|
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseTuple<FunctionType>>): void;
|
|
40
55
|
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseTuple<FunctionType>>): void;
|
|
@@ -48,11 +63,35 @@ export declare const testEachPromise: {
|
|
|
48
63
|
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
49
64
|
* function again.
|
|
50
65
|
*/
|
|
51
|
-
export declare const
|
|
66
|
+
export declare const testEachResolvedPromiseAgainstResolvedPromise: <FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseAgainstResolvedPromiseTuple<FunctionType>>) => void;
|
|
67
|
+
/**
|
|
68
|
+
* Tests each given test set (expected value follows by various list of
|
|
69
|
+
* function parameters). It respects function signature to raise compile time
|
|
70
|
+
* errors if given test set does not match given function signature.
|
|
71
|
+
* @param functionName - Function description to test.
|
|
72
|
+
* @param callback - Function reference to test.
|
|
73
|
+
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
74
|
+
* function again.
|
|
75
|
+
*/
|
|
76
|
+
export declare const testEachRejectedPromise: {
|
|
52
77
|
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseRejectionTuple<FunctionType>>): void;
|
|
53
78
|
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseRejectionTuple<FunctionType>>): void;
|
|
54
79
|
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseRejectionTuple<FunctionType>>): void;
|
|
55
80
|
};
|
|
81
|
+
/**
|
|
82
|
+
* Tests each given test set (expected value follows by various list of
|
|
83
|
+
* function parameters). It respects function signature to raise compile time
|
|
84
|
+
* errors if given test set does not match given function signature.
|
|
85
|
+
* @param functionName - Function description to test.
|
|
86
|
+
* @param callback - Function reference to test.
|
|
87
|
+
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
88
|
+
* function again.
|
|
89
|
+
*/
|
|
90
|
+
export declare const testEachRejectedPromiseAgainstResolvedPromise: {
|
|
91
|
+
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseRejectionAgainstResolvedPromiseTuple<FunctionType>>): void;
|
|
92
|
+
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseRejectionAgainstResolvedPromiseTuple<FunctionType>>): void;
|
|
93
|
+
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseRejectionAgainstResolvedPromiseTuple<FunctionType>>): void;
|
|
94
|
+
};
|
|
56
95
|
/**
|
|
57
96
|
* Tests each given single parameter against same given expected value. It
|
|
58
97
|
* respects function signature to raise compile time errors if given test set
|
|
@@ -76,11 +115,26 @@ export declare const testEachSingleParameterAgainstSameExpectation: {
|
|
|
76
115
|
* @param expected - Value to check each function call return value against.
|
|
77
116
|
* @param parameters - Additional first parameters to test given function with.
|
|
78
117
|
*/
|
|
79
|
-
export declare const
|
|
118
|
+
export declare const testEachResolvedPromiseWithSingleParameterAgainstSameExpectation: {
|
|
80
119
|
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
81
120
|
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
82
121
|
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
83
122
|
};
|
|
123
|
+
/**
|
|
124
|
+
* Tests each given single parameter against same given promises resolving to
|
|
125
|
+
* expected value. It respects function signature to raise compile time errors
|
|
126
|
+
* if given test set does not match given function signature.
|
|
127
|
+
* @param functionName - Function description to test.
|
|
128
|
+
* @param callback - Function reference to test.
|
|
129
|
+
* @param expected - Promise resolving to value to check each function call
|
|
130
|
+
* return value against.
|
|
131
|
+
* @param parameters - Additional first parameters to test given function with.
|
|
132
|
+
*/
|
|
133
|
+
export declare const testEachResolvedPromiseWithSingleParameterAgainstSameResolvedPromise: {
|
|
134
|
+
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<TestSymbol | ThenParameter<ReturnType<FunctionType>>>, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
135
|
+
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<TestSymbol | ThenParameter<ReturnType<FunctionType>>>, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
136
|
+
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<TestSymbol | ThenParameter<ReturnType<FunctionType>>>, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
137
|
+
};
|
|
84
138
|
/**
|
|
85
139
|
* Tests each given single parameter against same given expected value. It
|
|
86
140
|
* respects function signature to raise compile time errors if given test set
|
|
@@ -90,11 +144,25 @@ export declare const testEachSingleParameterAgainstSamePromisedExpectation: {
|
|
|
90
144
|
* @param expected - Value to check each function call return value against.
|
|
91
145
|
* @param parameters - Additional first parameters to test given function with.
|
|
92
146
|
*/
|
|
93
|
-
export declare const
|
|
147
|
+
export declare const testEachRejectedPromiseWithSingleParameterAgainstSameExpectation: {
|
|
94
148
|
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
95
149
|
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
96
150
|
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
97
151
|
};
|
|
152
|
+
/**
|
|
153
|
+
* Tests each given single parameter against same given expected value. It
|
|
154
|
+
* respects function signature to raise compile time errors if given test set
|
|
155
|
+
* does not match given function signature.
|
|
156
|
+
* @param functionName - Function description to test.
|
|
157
|
+
* @param callback - Function reference to test.
|
|
158
|
+
* @param expected - Value to check each function call return value against.
|
|
159
|
+
* @param parameters - Additional first parameters to test given function with.
|
|
160
|
+
*/
|
|
161
|
+
export declare const testEachRejectedPromiseWithSingleParameterAgainstSameResolvedPromise: {
|
|
162
|
+
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<Error | TestSymbol>, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
163
|
+
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<Error | TestSymbol>, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
164
|
+
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<Error | TestSymbol>, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
165
|
+
};
|
|
98
166
|
/**
|
|
99
167
|
* Tests each given test set (various list of function parameters) against same
|
|
100
168
|
* given expected value. It respects function signature to raise compile time
|
|
@@ -120,11 +188,28 @@ export declare const testEachAgainstSameExpectation: {
|
|
|
120
188
|
* @param functionParameters - Additional lists of parameters to test given
|
|
121
189
|
* function again.
|
|
122
190
|
*/
|
|
123
|
-
export declare const
|
|
191
|
+
export declare const testEachResolvedPromiseAgainstSameExpectation: {
|
|
124
192
|
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
125
193
|
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
126
194
|
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
127
195
|
};
|
|
196
|
+
/**
|
|
197
|
+
* Tests each given test set (various list of function parameters) against same
|
|
198
|
+
* given promise resolving expected value. It respects function signature to
|
|
199
|
+
* raise compile time errors if given test set does not match given function
|
|
200
|
+
* signature.
|
|
201
|
+
* @param functionName - Function description to test.
|
|
202
|
+
* @param callback - Function reference to test.
|
|
203
|
+
* @param expected - Promise resolving to value to check each function call
|
|
204
|
+
* return value against.
|
|
205
|
+
* @param functionParameters - Additional lists of parameters to test given
|
|
206
|
+
* function again.
|
|
207
|
+
*/
|
|
208
|
+
export declare const testEachResolvedPromiseAgainstSameResolvedPromise: {
|
|
209
|
+
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<TestSymbol | ThenParameter<ReturnType<FunctionType>>>, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
210
|
+
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<TestSymbol | ThenParameter<ReturnType<FunctionType>>>, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
211
|
+
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<TestSymbol | ThenParameter<ReturnType<FunctionType>>>, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
212
|
+
};
|
|
128
213
|
/**
|
|
129
214
|
* Tests each given test set (various list of function parameters) against same
|
|
130
215
|
* given expected value. It respects function signature to raise compile time
|
|
@@ -135,9 +220,26 @@ export declare const testEachPromiseAgainstSameExpectation: {
|
|
|
135
220
|
* @param functionParameters - Additional lists of parameters to test given
|
|
136
221
|
* function again.
|
|
137
222
|
*/
|
|
138
|
-
export declare const
|
|
223
|
+
export declare const testEachRejectedPromiseAgainstSameExpectation: {
|
|
139
224
|
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
140
225
|
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
141
226
|
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
142
227
|
};
|
|
228
|
+
/**
|
|
229
|
+
* Tests each given test set (various list of function parameters) against same
|
|
230
|
+
* given promise resolving expected value. It respects function signature to
|
|
231
|
+
* raise compile time errors if given test set does not match given function
|
|
232
|
+
* signature.
|
|
233
|
+
* @param functionName - Function description to test.
|
|
234
|
+
* @param callback - Function reference to test.
|
|
235
|
+
* @param expected - Promise resolving to value to check each function call
|
|
236
|
+
* return value against.
|
|
237
|
+
* @param functionParameters - Additional lists of parameters to test given
|
|
238
|
+
* function again.
|
|
239
|
+
*/
|
|
240
|
+
export declare const testEachRejectedPromiseAgainstSameResolvedPromise: {
|
|
241
|
+
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<Error | TestSymbol>, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
242
|
+
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<Error | TestSymbol>, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
243
|
+
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Promise<Error | TestSymbol>, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
244
|
+
};
|
|
143
245
|
export default testEach;
|