clientnode 4.0.1441 → 4.0.1443
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/Lock.d.ts +39 -0
- package/dist/Lock.js +69 -83
- package/dist/Logger.d.ts +102 -0
- package/dist/Logger.js +756 -163
- package/dist/Semaphore.d.ts +29 -0
- package/dist/Semaphore.js +56 -46
- package/dist/array.d.ts +150 -0
- package/dist/array.js +661 -337
- package/dist/bundle/Lock.js +86 -0
- package/dist/bundle/Logger.js +778 -0
- package/dist/bundle/Semaphore.js +75 -0
- package/dist/bundle/array.js +776 -0
- package/dist/bundle/cli.js +59 -0
- package/dist/bundle/constants.js +214 -0
- package/dist/bundle/context.js +280 -0
- package/dist/bundle/cookie.js +301 -0
- package/dist/bundle/data-transfer.js +825 -0
- package/dist/bundle/datetime.js +1148 -0
- package/dist/bundle/domNode.js +549 -0
- package/dist/bundle/expression/evaluators.js +1228 -0
- package/dist/bundle/expression/helper.js +117 -0
- package/dist/bundle/expression/index.js +1357 -0
- package/dist/bundle/expression/indicator-functions.js +332 -0
- package/dist/bundle/expression/type.js +16 -0
- package/dist/bundle/filesystem.js +436 -0
- package/dist/bundle/function.js +117 -0
- package/dist/bundle/index.js +3249 -0
- package/dist/bundle/indicators.js +565 -0
- package/dist/bundle/module.js +213 -0
- package/dist/bundle/number.js +527 -0
- package/dist/bundle/object.js +1104 -0
- package/dist/bundle/process.js +291 -0
- package/dist/bundle/property-types.js +36 -0
- package/dist/bundle/scope.js +2121 -0
- package/dist/bundle/string.js +1213 -0
- package/dist/bundle/test-helper.js +802 -0
- package/dist/bundle/type.js +16 -0
- package/dist/bundle/utility.js +420 -0
- package/dist/cli.d.ts +31 -0
- package/dist/cli.js +45 -37
- package/dist/compatible/Lock.js +86 -0
- package/dist/compatible/Logger.js +778 -0
- package/dist/compatible/Semaphore.js +75 -0
- package/dist/compatible/array.js +776 -0
- package/dist/compatible/cli.js +59 -0
- package/dist/compatible/constants.js +214 -0
- package/dist/compatible/context.js +280 -0
- package/dist/compatible/cookie.js +301 -0
- package/dist/compatible/data-transfer.js +825 -0
- package/dist/compatible/datetime.js +1148 -0
- package/dist/compatible/domNode.js +549 -0
- package/dist/compatible/expression/evaluators.js +1228 -0
- package/dist/compatible/expression/helper.js +117 -0
- package/dist/compatible/expression/index.js +1357 -0
- package/dist/compatible/expression/indicator-functions.js +332 -0
- package/dist/compatible/expression/type.js +16 -0
- package/dist/compatible/filesystem.js +436 -0
- package/dist/compatible/function.js +117 -0
- package/dist/compatible/index.js +3249 -0
- package/dist/compatible/indicators.js +565 -0
- package/dist/compatible/module.js +213 -0
- package/dist/compatible/number.js +527 -0
- package/dist/compatible/object.js +1104 -0
- package/dist/compatible/process.js +291 -0
- package/dist/compatible/property-types.js +36 -0
- package/dist/compatible/scope.js +2121 -0
- package/dist/compatible/string.js +1213 -0
- package/dist/compatible/test-helper.js +802 -0
- package/dist/compatible/type.js +16 -0
- package/dist/compatible/utility.js +420 -0
- package/dist/constants.d.ts +99 -0
- package/dist/constants.js +198 -110
- package/dist/context.d.ts +8 -0
- package/dist/context.js +265 -25
- package/dist/cookie.d.ts +31 -0
- package/dist/cookie.js +265 -48
- package/dist/data-transfer.d.ts +45 -0
- package/dist/data-transfer.js +775 -166
- package/dist/datetime.d.ts +37 -0
- package/dist/datetime.js +1107 -241
- package/dist/domNode.d.ts +82 -0
- package/dist/domNode.js +495 -277
- package/dist/expression/evaluators.d.ts +55 -0
- package/dist/expression/evaluators.js +1189 -234
- package/dist/expression/helper.d.ts +4 -0
- package/dist/expression/helper.js +102 -82
- package/dist/expression/index.d.ts +7 -0
- package/dist/expression/index.js +1341 -10
- package/dist/expression/indicator-functions.d.ts +14 -0
- package/dist/expression/indicator-functions.js +316 -21
- package/dist/expression/type.d.ts +70 -0
- package/dist/expression/type.js +1 -5
- package/dist/filesystem.d.ts +143 -0
- package/dist/filesystem.js +349 -323
- package/dist/function.d.ts +20 -0
- package/dist/function.js +93 -51
- package/dist/index.d.ts +23 -0
- package/dist/index.js +3232 -26
- package/dist/indicators.d.ts +68 -0
- package/dist/indicators.js +512 -68
- package/dist/module.d.ts +8 -0
- package/dist/module.js +197 -99
- package/dist/number.d.ts +35 -0
- package/dist/number.js +491 -25
- package/dist/object.d.ts +231 -0
- package/dist/object.js +917 -775
- package/dist/process.d.ts +22 -0
- package/dist/process.js +261 -38
- package/dist/property-types.d.ts +460 -0
- package/dist/property-types.js +17 -96
- package/dist/scope.d.ts +44 -0
- package/dist/scope.js +2092 -56
- package/dist/string.d.ts +312 -0
- package/dist/string.js +991 -603
- package/dist/test/Lock.d.ts +1 -0
- package/dist/test/Logger.d.ts +1 -0
- package/dist/test/Semaphore.d.ts +1 -0
- package/dist/test/array.d.ts +1 -0
- package/dist/test/cookie.d.ts +1 -0
- package/dist/test/data-transfer.d.ts +1 -0
- package/dist/test/datetime.d.ts +1 -0
- package/dist/test/domNode.d.ts +1 -0
- package/dist/test/expression/evaluators.d.ts +1 -0
- package/dist/test/expression/helper.d.ts +1 -0
- package/dist/test/expression/indicator-functions.d.ts +1 -0
- package/dist/test/filesystem.d.ts +1 -0
- package/dist/test/function.d.ts +1 -0
- package/dist/test/indicators.d.ts +1 -0
- package/dist/test/number.d.ts +1 -0
- package/dist/test/object.d.ts +1 -0
- package/dist/test/process.d.ts +1 -0
- package/dist/test/property-types.d.ts +1 -0
- package/dist/test/scope.d.ts +1 -0
- package/dist/test/string.d.ts +1 -0
- package/dist/test/utility.d.ts +1 -0
- package/dist/test-helper.d.ts +143 -0
- package/dist/test-helper.js +633 -171
- package/dist/type.d.ts +230 -0
- package/dist/type.js +4 -9
- package/dist/utility.d.ts +44 -0
- package/dist/utility.js +372 -91
- package/package.json +3 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import type { AnyFunction, FirstParameter, FunctionTestTuple, FunctionTestPromiseTuple, FunctionTestPromiseRejectionTuple, TestMatchers as Matchers, TestSymbol, ThenParameter, UnknownFunction } from './type';
|
|
2
|
+
export declare const TEST_DEFINED_SYMBOL: unique symbol;
|
|
3
|
+
export declare const TEST_THROW_SYMBOL: unique symbol;
|
|
4
|
+
export declare const TEST_UNDEFINED_SYMBOL: unique symbol;
|
|
5
|
+
/**
|
|
6
|
+
* Tests given result against given expectations. Respects special symbol
|
|
7
|
+
* values.
|
|
8
|
+
* @param givenResult - Target to compare expectation against.
|
|
9
|
+
* @param expected - Expected result.
|
|
10
|
+
* @param wrap - Indicates whether to wrap with an expect function call.
|
|
11
|
+
* @returns Nothing or a promise resolving to nothing.
|
|
12
|
+
*/
|
|
13
|
+
export declare const expectExpectedType: <Type = unknown, Result extends Promise<void> | void = void>(givenResult: Matchers<Result> | Result, expected: TestSymbol | Type, wrap?: boolean) => Result;
|
|
14
|
+
/**
|
|
15
|
+
* Tests each given test set (expected value follows by various list of
|
|
16
|
+
* function parameters). It respects function signature to raise compile time
|
|
17
|
+
* errors if given test set does not match given function signature.
|
|
18
|
+
* @param functionName - Function description to test.
|
|
19
|
+
* @param callback - Function reference to test.
|
|
20
|
+
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
21
|
+
* function again.
|
|
22
|
+
*/
|
|
23
|
+
export declare const testEach: {
|
|
24
|
+
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestTuple<FunctionType>>): void;
|
|
25
|
+
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestTuple<FunctionType>>): void;
|
|
26
|
+
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestTuple<FunctionType>>): void;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Tests each given test set (expected value follows by various list of
|
|
30
|
+
* function parameters). It respects function signature to raise compile time
|
|
31
|
+
* errors if given test set does not match given function signature.
|
|
32
|
+
* @param functionName - Function description to test.
|
|
33
|
+
* @param callback - Function reference to test.
|
|
34
|
+
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
35
|
+
* function again.
|
|
36
|
+
*/
|
|
37
|
+
export declare const testEachPromise: {
|
|
38
|
+
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseTuple<FunctionType>>): void;
|
|
39
|
+
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseTuple<FunctionType>>): void;
|
|
40
|
+
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseTuple<FunctionType>>): void;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Tests each given test set (expected value follows by various list of
|
|
44
|
+
* function parameters). It respects function signature to raise compile time
|
|
45
|
+
* errors if given test set does not match given function signature.
|
|
46
|
+
* @param functionName - Function description to test.
|
|
47
|
+
* @param callback - Function reference to test.
|
|
48
|
+
* @param functionTestTuple - Additional arrays of test sets to test given
|
|
49
|
+
* function again.
|
|
50
|
+
*/
|
|
51
|
+
export declare const testEachPromiseRejection: {
|
|
52
|
+
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseRejectionTuple<FunctionType>>): void;
|
|
53
|
+
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseRejectionTuple<FunctionType>>): void;
|
|
54
|
+
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, ...functionTestTuple: Array<FunctionTestPromiseRejectionTuple<FunctionType>>): void;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Tests each given single parameter against same given expected value. It
|
|
58
|
+
* respects function signature to raise compile time errors if given test set
|
|
59
|
+
* does not match given function signature.
|
|
60
|
+
* @param functionName - Function description to test.
|
|
61
|
+
* @param callback - Function reference to test.
|
|
62
|
+
* @param expected - Value to check each function call return value against.
|
|
63
|
+
* @param parameters - Additional first parameters to test given function with.
|
|
64
|
+
*/
|
|
65
|
+
export declare const testEachSingleParameterAgainstSameExpectation: {
|
|
66
|
+
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: ReturnType<FunctionType> | TestSymbol, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
67
|
+
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: ReturnType<FunctionType> | TestSymbol, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
68
|
+
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: ReturnType<FunctionType> | TestSymbol, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Tests each given single parameter against same given expected value. It
|
|
72
|
+
* respects function signature to raise compile time errors if given test set
|
|
73
|
+
* does not match given function signature.
|
|
74
|
+
* @param functionName - Function description to test.
|
|
75
|
+
* @param callback - Function reference to test.
|
|
76
|
+
* @param expected - Value to check each function call return value against.
|
|
77
|
+
* @param parameters - Additional first parameters to test given function with.
|
|
78
|
+
*/
|
|
79
|
+
export declare const testEachSingleParameterAgainstSamePromisedExpectation: {
|
|
80
|
+
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
81
|
+
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
82
|
+
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Tests each given single parameter against same given expected value. It
|
|
86
|
+
* respects function signature to raise compile time errors if given test set
|
|
87
|
+
* does not match given function signature.
|
|
88
|
+
* @param functionName - Function description to test.
|
|
89
|
+
* @param callback - Function reference to test.
|
|
90
|
+
* @param expected - Value to check each function call return value against.
|
|
91
|
+
* @param parameters - Additional first parameters to test given function with.
|
|
92
|
+
*/
|
|
93
|
+
export declare const testEachSingleParameterAgainstSameRejectedExpectation: {
|
|
94
|
+
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
95
|
+
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
96
|
+
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...parameters: Array<FirstParameter<FunctionType>>): void;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Tests each given test set (various list of function parameters) against same
|
|
100
|
+
* given expected value. It respects function signature to raise compile time
|
|
101
|
+
* errors if given test set does not match given function signature.
|
|
102
|
+
* @param functionName - Function description to test.
|
|
103
|
+
* @param callback - Function reference to test.
|
|
104
|
+
* @param expected - Value to check each function call return value against.
|
|
105
|
+
* @param functionParameters - Additional lists of parameters to test given
|
|
106
|
+
* function again.
|
|
107
|
+
*/
|
|
108
|
+
export declare const testEachAgainstSameExpectation: {
|
|
109
|
+
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: ReturnType<FunctionType> | TestSymbol, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
110
|
+
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: ReturnType<FunctionType> | TestSymbol, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
111
|
+
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: ReturnType<FunctionType> | TestSymbol, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Tests each given test set (various list of function parameters) against same
|
|
115
|
+
* given expected value. It respects function signature to raise compile time
|
|
116
|
+
* errors if given test set does not match given function signature.
|
|
117
|
+
* @param functionName - Function description to test.
|
|
118
|
+
* @param callback - Function reference to test.
|
|
119
|
+
* @param expected - Value to check each function call return value against.
|
|
120
|
+
* @param functionParameters - Additional lists of parameters to test given
|
|
121
|
+
* function again.
|
|
122
|
+
*/
|
|
123
|
+
export declare const testEachPromiseAgainstSameExpectation: {
|
|
124
|
+
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
125
|
+
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
126
|
+
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: TestSymbol | ThenParameter<ReturnType<FunctionType>>, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Tests each given test set (various list of function parameters) against same
|
|
130
|
+
* given expected value. It respects function signature to raise compile time
|
|
131
|
+
* errors if given test set does not match given function signature.
|
|
132
|
+
* @param functionName - Function description to test.
|
|
133
|
+
* @param callback - Function reference to test.
|
|
134
|
+
* @param expected - Value to check each function call return value against.
|
|
135
|
+
* @param functionParameters - Additional lists of parameters to test given
|
|
136
|
+
* function again.
|
|
137
|
+
*/
|
|
138
|
+
export declare const testEachPromiseRejectionAgainstSameExpectation: {
|
|
139
|
+
<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
140
|
+
only<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
141
|
+
skip<FunctionType extends AnyFunction = UnknownFunction>(functionName: string, callback: FunctionType, expected: Error | TestSymbol, ...functionParameters: Array<Parameters<FunctionType>>): void;
|
|
142
|
+
};
|
|
143
|
+
export default testEach;
|