@everyonesoftware/common 4.0.0 → 6.0.0
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/outputs/characterWriteStream-DUlG_bx_.d.cts +795 -0
- package/outputs/characterWriteStream-DUlG_bx_.d.ts +795 -0
- package/outputs/{chunk-AY3YWKOM.js → chunk-5Z677JON.js} +947 -3386
- package/outputs/chunk-5Z677JON.js.map +1 -0
- package/outputs/chunk-6V7JRJ7P.js +2469 -0
- package/outputs/chunk-6V7JRJ7P.js.map +1 -0
- package/outputs/chunk-CHBOMCYM.js +845 -0
- package/outputs/chunk-CHBOMCYM.js.map +1 -0
- package/outputs/{sources.cjs → sourceIndex.cjs} +1 -1
- package/outputs/{sources.d.cts → sourceIndex.d.cts} +351 -1143
- package/outputs/{sources.d.ts → sourceIndex.d.ts} +351 -1143
- package/outputs/{sources.js → sourceIndex.js} +32 -30
- package/outputs/{sources.js.map → sourceIndex.js.map} +1 -1
- package/outputs/testIndex.cjs +5832 -0
- package/outputs/testIndex.cjs.map +1 -0
- package/outputs/testIndex.d.cts +428 -0
- package/outputs/testIndex.d.ts +428 -0
- package/outputs/testIndex.js +26 -0
- package/outputs/testIndex.js.map +1 -0
- package/outputs/tests.js +2171 -2985
- package/outputs/tests.js.map +1 -1
- package/package.json +7 -7
- package/outputs/chunk-AY3YWKOM.js.map +0 -1
- /package/outputs/{sources.cjs.map → sourceIndex.cjs.map} +0 -0
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
import { S as SyncResult, P as PromiseAsyncResult, k as Type, I as Iterable, f as JavascriptIterable, C as CharacterWriteStream } from './characterWriteStream-DUlG_bx_.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A type that can be used to make assertions during a test.
|
|
5
|
+
*/
|
|
6
|
+
declare abstract class Test {
|
|
7
|
+
/**
|
|
8
|
+
* Fail the current test with the provided message.
|
|
9
|
+
* @param message The message that explains why this test failed.
|
|
10
|
+
*/
|
|
11
|
+
abstract fail(message: string): never;
|
|
12
|
+
/**
|
|
13
|
+
* Assert that the provided value is undefined;
|
|
14
|
+
* @param value The value to check.
|
|
15
|
+
*/
|
|
16
|
+
assertUndefined(value: unknown): asserts value is undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Assert that the provided value is undefined.
|
|
19
|
+
* @param test The current {@link Test}.
|
|
20
|
+
* @param value The value to check.
|
|
21
|
+
*/
|
|
22
|
+
static assertUndefined(test: Test, value: unknown): asserts value is undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Assert that the provided value is not undefined;
|
|
25
|
+
* @param value The value to check.
|
|
26
|
+
*/
|
|
27
|
+
assertNotUndefined<T>(value: T): asserts value is NonNullable<T>;
|
|
28
|
+
/**
|
|
29
|
+
* Assert that the provided value is not undefined.
|
|
30
|
+
* @param test The current {@link Test}.
|
|
31
|
+
* @param value The value to check.
|
|
32
|
+
*/
|
|
33
|
+
static assertNotUndefined<T>(test: Test, value: unknown): asserts value is NonNullable<T>;
|
|
34
|
+
/**
|
|
35
|
+
* Assert that the provided value is null.
|
|
36
|
+
* @param value The value to check.
|
|
37
|
+
*/
|
|
38
|
+
assertNull(value: unknown): asserts value is null;
|
|
39
|
+
/**
|
|
40
|
+
* Assert that the provided value is null.
|
|
41
|
+
* @param value The value to check.
|
|
42
|
+
*/
|
|
43
|
+
static assertNull(test: Test, value: unknown): asserts value is null;
|
|
44
|
+
/**
|
|
45
|
+
* Assert that the provided value is not null.
|
|
46
|
+
* @param value The value to check.
|
|
47
|
+
*/
|
|
48
|
+
assertNotNull<T>(value: T): asserts value is NonNullable<T>;
|
|
49
|
+
/**
|
|
50
|
+
* Assert that the provided value is not null.
|
|
51
|
+
* @param value The value to check.
|
|
52
|
+
*/
|
|
53
|
+
static assertNotNull<T>(test: Test, value: T): asserts value is NonNullable<T>;
|
|
54
|
+
/**
|
|
55
|
+
* Assert that the provided value is not undefined and not null.
|
|
56
|
+
* @param value The value to check.
|
|
57
|
+
*/
|
|
58
|
+
assertNotUndefinedAndNotNull<T>(value: T): asserts value is NonNullable<T>;
|
|
59
|
+
/**
|
|
60
|
+
* Assert that the provided value is not undefined and not null.
|
|
61
|
+
* @param value The value to check.
|
|
62
|
+
*/
|
|
63
|
+
static assertNotUndefinedAndNotNull<T>(test: Test, value: T): asserts value is NonNullable<T>;
|
|
64
|
+
/**
|
|
65
|
+
* Assert that the provided values point to the same object.
|
|
66
|
+
* @param left The first value.
|
|
67
|
+
* @param right The second value.
|
|
68
|
+
*/
|
|
69
|
+
abstract assertSame<T>(left: T, right: T): void;
|
|
70
|
+
/**
|
|
71
|
+
* Assert that the provided values don't point to the same object.
|
|
72
|
+
* @param left The first value.
|
|
73
|
+
* @param right The second value.
|
|
74
|
+
*/
|
|
75
|
+
abstract assertNotSame<T>(left: T, right: T): void;
|
|
76
|
+
/**
|
|
77
|
+
* Assert that the provided values are equal.
|
|
78
|
+
* @param left The first value.
|
|
79
|
+
* @param right The second value.
|
|
80
|
+
* @param message A message that will be shown when the values are not equal.
|
|
81
|
+
*/
|
|
82
|
+
abstract assertEqual<T>(left: T, right: T, message?: string): void;
|
|
83
|
+
/**
|
|
84
|
+
* Assert that the provided values are not equal.
|
|
85
|
+
* @param left The first value.
|
|
86
|
+
* @param right The second value.
|
|
87
|
+
*/
|
|
88
|
+
abstract assertNotEqual<T>(left: T, right: T): void;
|
|
89
|
+
/**
|
|
90
|
+
* Assert that the provided value is false.
|
|
91
|
+
* @param value The value to check.
|
|
92
|
+
*/
|
|
93
|
+
assertFalse(value: boolean): asserts value is false;
|
|
94
|
+
/**
|
|
95
|
+
* Assert that the provided value is false.
|
|
96
|
+
* @param value The value to check.
|
|
97
|
+
*/
|
|
98
|
+
static assertFalse(test: Test, value: boolean): asserts value is false;
|
|
99
|
+
/**
|
|
100
|
+
* Assert that the provided value is true.
|
|
101
|
+
* @param value The value to check.
|
|
102
|
+
*/
|
|
103
|
+
assertTrue(value: boolean): asserts value is true;
|
|
104
|
+
/**
|
|
105
|
+
* Assert that the provided value is true.
|
|
106
|
+
* @param value The value to check.
|
|
107
|
+
*/
|
|
108
|
+
static assertTrue(test: Test, value: boolean): asserts value is true;
|
|
109
|
+
/**
|
|
110
|
+
* Assert that the provided action throws the provided {@link Error} when it is run.
|
|
111
|
+
* @param action The action to run.
|
|
112
|
+
* @param expectedError The optional expected {@link Error} to compare against the thrown
|
|
113
|
+
* {@link Error}. If the expected {@link Error} is not provided, then any {@link Error} will
|
|
114
|
+
* satisfy this assertion.
|
|
115
|
+
*/
|
|
116
|
+
abstract assertThrows(action: SyncResult<unknown> | (() => void), expectedError?: Error): void;
|
|
117
|
+
/**
|
|
118
|
+
* Assert that the provided action throws the provided {@link Error} when it is run.
|
|
119
|
+
* @param action The action to run.
|
|
120
|
+
* @param expectedError The expected {@link Error}.
|
|
121
|
+
*/
|
|
122
|
+
abstract assertThrowsAsync(action: PromiseLike<unknown> | (() => PromiseLike<unknown>), expectedError: Error): PromiseAsyncResult<void>;
|
|
123
|
+
/**
|
|
124
|
+
* Assert that the provided value is an instance of the provided {@link Type}.
|
|
125
|
+
* @param value The value to check.
|
|
126
|
+
* @param type The {@link Type} to check.
|
|
127
|
+
* @param expression The expression that produced the value.
|
|
128
|
+
* @param message An optional error message.
|
|
129
|
+
*/
|
|
130
|
+
assertInstanceOf<T>(value: unknown, type: Type<T>, typeCheck?: (value: unknown) => value is T): asserts value is T;
|
|
131
|
+
/**
|
|
132
|
+
* Assert that the provided value is an instance of the provided {@link Type}.
|
|
133
|
+
* @param value The value to check.
|
|
134
|
+
* @param type The {@link Type} to check.
|
|
135
|
+
* @param expression The expression that produced the value.
|
|
136
|
+
* @param message An optional error message.
|
|
137
|
+
*/
|
|
138
|
+
static assertInstanceOf<T>(test: Test, value: unknown, type: Type<T>, typeCheck?: (value: unknown) => value is T): asserts value is T;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* A {@link Test} type that uses the standard "assert" module to make assertions.
|
|
143
|
+
*/
|
|
144
|
+
declare class AssertTest implements Test {
|
|
145
|
+
private readonly name;
|
|
146
|
+
protected constructor(name: string);
|
|
147
|
+
/**
|
|
148
|
+
* Create a new {@link AssertTest} object.
|
|
149
|
+
*/
|
|
150
|
+
static create(name: string): AssertTest;
|
|
151
|
+
fail(message: string): never;
|
|
152
|
+
assertUndefined(value: unknown): asserts value is undefined;
|
|
153
|
+
assertNotUndefined<T>(value: T): asserts value is NonNullable<T>;
|
|
154
|
+
assertNull(value: unknown): asserts value is null;
|
|
155
|
+
assertNotNull<T>(value: T): asserts value is NonNullable<T>;
|
|
156
|
+
assertNotUndefinedAndNotNull<T>(value: T): asserts value is NonNullable<T>;
|
|
157
|
+
assertSame<T>(left: T, right: T): void;
|
|
158
|
+
assertNotSame<T>(left: T, right: T): void;
|
|
159
|
+
assertEqual<T>(left: T, right: T, message?: string): void;
|
|
160
|
+
assertNotEqual<T>(left: T, right: T): void;
|
|
161
|
+
assertFalse(value: boolean): void;
|
|
162
|
+
assertTrue(value: boolean): void;
|
|
163
|
+
assertThrows(action: SyncResult<unknown> | (() => void), expectedError?: Error): void;
|
|
164
|
+
assertThrowsAsync(action: Promise<unknown> | (() => Promise<unknown>), expectedError: Error): PromiseAsyncResult<void>;
|
|
165
|
+
assertInstanceOf<T>(value: unknown, type: Type<T>, typeCheck?: (value: unknown) => value is T): asserts value is T;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* A type that is used to mark that a test group or a test should be skipped.
|
|
170
|
+
*/
|
|
171
|
+
declare abstract class TestSkip {
|
|
172
|
+
protected constructor();
|
|
173
|
+
/**
|
|
174
|
+
* Create a new {@link TestSkip} with the provided properties.
|
|
175
|
+
* @param shouldSkip Whether the tests associated with the new {@link TestSkip}
|
|
176
|
+
* should be skipped.
|
|
177
|
+
* @param message The message that explains why the tests associated with this {@link TestSkip}
|
|
178
|
+
* should be skipped.
|
|
179
|
+
*/
|
|
180
|
+
static create(shouldSkip?: boolean, message?: string): TestSkip;
|
|
181
|
+
/**
|
|
182
|
+
* Get whether the tests associated with this {@link TestSkip} should be skipped.
|
|
183
|
+
*/
|
|
184
|
+
abstract getShouldSkip(): boolean;
|
|
185
|
+
/**
|
|
186
|
+
* Get the message that explains why the tests associated with this {@link TestSkip}
|
|
187
|
+
* should be skipped.
|
|
188
|
+
*/
|
|
189
|
+
abstract getMessage(): string;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* A type that can be used to run tests.
|
|
194
|
+
*/
|
|
195
|
+
declare abstract class TestRunner {
|
|
196
|
+
/**
|
|
197
|
+
* Get a {@link string} that concatenates the {@link string} representation of each
|
|
198
|
+
* of the provided values into an "and-list".
|
|
199
|
+
* @param values The values to concatenate.
|
|
200
|
+
*/
|
|
201
|
+
andList(values: unknown[] | Iterable<unknown>): string;
|
|
202
|
+
/**
|
|
203
|
+
* Get a {@link string} that concatenates the {@link string} representation of each
|
|
204
|
+
* of the provided values into an "and-list".
|
|
205
|
+
* @param values The values to concatenate.
|
|
206
|
+
*/
|
|
207
|
+
static andList(runner: TestRunner, values: unknown[] | Iterable<unknown>): string;
|
|
208
|
+
/**
|
|
209
|
+
* Get the {@link string} representation of the provided value.
|
|
210
|
+
* @param value The value to get the {@link string} representation of.
|
|
211
|
+
*/
|
|
212
|
+
toString(value: unknown): string;
|
|
213
|
+
/**
|
|
214
|
+
* Get the {@link string} representation of the provided value.
|
|
215
|
+
* @param value The value to get the {@link string} representation of.
|
|
216
|
+
*/
|
|
217
|
+
static toString(_runner: TestRunner, value: unknown): string;
|
|
218
|
+
skip(message?: string): TestSkip;
|
|
219
|
+
/**
|
|
220
|
+
* Create a {@link TestSkip} object that will prevent tests from being run.
|
|
221
|
+
* @param shouldSkip Whether these tests should be skipped.
|
|
222
|
+
* @param message The message that explains why the tests are being skipped.
|
|
223
|
+
*/
|
|
224
|
+
skip(shouldSkip: boolean, message?: string): TestSkip;
|
|
225
|
+
/**
|
|
226
|
+
* Create a {@link TestSkip} object that will prevent tests from being run.
|
|
227
|
+
* @param shouldSkip Whether these tests should be skipped.
|
|
228
|
+
* @param message The message that explains why the tests are being skipped.
|
|
229
|
+
*/
|
|
230
|
+
static skip(_runner: TestRunner, shouldSkip?: boolean, message?: string): TestSkip;
|
|
231
|
+
static runTestAction(runner: TestRunner, name: string, skip: TestSkip | undefined, testAction: (() => void) | ((test: Test) => void)): void;
|
|
232
|
+
/**
|
|
233
|
+
* Create a test group that will test the provided file.
|
|
234
|
+
* @param fileName The name of the file that is being tested.
|
|
235
|
+
* @param testAction The action that will run the tests.
|
|
236
|
+
*/
|
|
237
|
+
testFile(fileName: string, testAction: (() => void) | ((test: Test) => void)): void;
|
|
238
|
+
/**
|
|
239
|
+
* Create a test group that will test the provided file.
|
|
240
|
+
* @param fileName The name of the file that is being tested.
|
|
241
|
+
* @param skip A value that indicates whether these tests should be skipped.
|
|
242
|
+
* @param testAction The action that will run the tests.
|
|
243
|
+
*/
|
|
244
|
+
testFile(fileName: string, skip: TestSkip | undefined, testAction: (() => void) | ((test: Test) => void)): void;
|
|
245
|
+
/**
|
|
246
|
+
* Create a test group that will test the provided file.
|
|
247
|
+
* @param runner The {@link TestRunner} that will run the tests.
|
|
248
|
+
* @param fileName The name of the file that is being tested.
|
|
249
|
+
* @param testAction The action that will run the tests.
|
|
250
|
+
*/
|
|
251
|
+
static testFile(runner: TestRunner, fileName: string, skipOrTestAction: TestSkip | ((() => void) | ((test: Test) => void)) | undefined, testAction?: (() => void) | ((test: Test) => void)): void;
|
|
252
|
+
/**
|
|
253
|
+
* Create a test group that will test the provided type.
|
|
254
|
+
* @param type The {@link Type} or name of the type that is being tested.
|
|
255
|
+
* @param testAction The action that will run the tests.
|
|
256
|
+
*/
|
|
257
|
+
testType(typeNameOrType: string | Type<unknown>, testAction: (() => void) | ((test: Test) => void)): void;
|
|
258
|
+
/**
|
|
259
|
+
* Create a test group that will test the provided type.
|
|
260
|
+
* @param type The {@link Type} or name of the type that is being tested.
|
|
261
|
+
* @param skip A value that indicates whether these tests should be skipped.
|
|
262
|
+
* @param testAction The action that will run the tests.
|
|
263
|
+
*/
|
|
264
|
+
testType(typeNameOrType: string | Type<unknown>, skip: TestSkip | undefined, testAction: (() => void) | ((test: Test) => void)): void;
|
|
265
|
+
/**
|
|
266
|
+
* Create a test group that will test the provided type.
|
|
267
|
+
* @param runner The {@link TestRunner} that will run the tests.
|
|
268
|
+
* @param type The {@link Type} or name of the type that is being tested.
|
|
269
|
+
* @param testAction The action that will run the tests.
|
|
270
|
+
*/
|
|
271
|
+
static testType(runner: TestRunner, typeNameOrType: string | Type<unknown>, skipOrTestAction: TestSkip | undefined | ((() => void) | ((test: Test) => void)), testAction: ((() => void) | ((test: Test) => void)) | undefined): void;
|
|
272
|
+
/**
|
|
273
|
+
* Create a test group that will test the provided function.
|
|
274
|
+
* @param functionSignature The signature of the function that is being tested.
|
|
275
|
+
* @param testAction The action that will run the tests.
|
|
276
|
+
*/
|
|
277
|
+
testFunction(functionSignature: string, testAction: (() => void) | ((test: Test) => void)): void;
|
|
278
|
+
testFunction(functionSignature: string, skip: TestSkip | undefined, testAction: (() => void) | ((test: Test) => void)): void;
|
|
279
|
+
/**
|
|
280
|
+
* Create a test group that will test the provided function.
|
|
281
|
+
* @param runner The {@link TestRunner} that will run the tests.
|
|
282
|
+
* @param functionSignature The signature of the function that is being tested.
|
|
283
|
+
* @param testAction The action that will run the tests.
|
|
284
|
+
*/
|
|
285
|
+
static testFunction(runner: TestRunner, functionSignature: string, skipOrTestAction: TestSkip | undefined | ((() => void) | ((test: Test) => void)), testAction: ((() => void) | ((test: Test) => void)) | undefined): void;
|
|
286
|
+
/**
|
|
287
|
+
* Create and run a test group with the provided name.
|
|
288
|
+
* @param testGroupName The name of the test group to run.
|
|
289
|
+
* @param testAction The action that runs the test group.
|
|
290
|
+
*/
|
|
291
|
+
abstract testGroup(testGroupName: string, testAction: () => void): void;
|
|
292
|
+
/**
|
|
293
|
+
* Create and run a test group with the provided name.
|
|
294
|
+
* @param testGroupName The name of the test group to run.
|
|
295
|
+
* @param testAction The action that runs the test group.
|
|
296
|
+
*/
|
|
297
|
+
abstract testGroup(testGroupName: string, skip: TestSkip | undefined, testAction: () => void): void;
|
|
298
|
+
/**
|
|
299
|
+
* Create and run a test with the provided name.
|
|
300
|
+
* @param testName The name of the test to run.
|
|
301
|
+
* @param testAction The action that runs the test.
|
|
302
|
+
*/
|
|
303
|
+
abstract test(testName: string, testAction: (test: Test) => void): void;
|
|
304
|
+
/**
|
|
305
|
+
* Create and run a test with the provided name.
|
|
306
|
+
* @param testName The name of the test to run.
|
|
307
|
+
* @param testAction The action that runs the test.
|
|
308
|
+
*/
|
|
309
|
+
abstract test(testName: string, skip: TestSkip | undefined, testAction: (test: Test) => void): void;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
declare function test(runner: TestRunner): void;
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* A type that is used to mark that a test group or a test should be skipped.
|
|
316
|
+
*/
|
|
317
|
+
declare class BasicTestSkip implements TestSkip {
|
|
318
|
+
private readonly shouldSkip;
|
|
319
|
+
private readonly message;
|
|
320
|
+
private constructor();
|
|
321
|
+
/**
|
|
322
|
+
* Create a new {@link TestSkip} with the provided properties.
|
|
323
|
+
* @param shouldSkip Whether the tests associated with the new {@link TestSkip}
|
|
324
|
+
* should be skipped.
|
|
325
|
+
* @param message The message that explains why the tests associated with this {@link TestSkip}
|
|
326
|
+
* should be skipped.
|
|
327
|
+
*/
|
|
328
|
+
static create(shouldSkip?: boolean, message?: string): BasicTestSkip;
|
|
329
|
+
getShouldSkip(): boolean;
|
|
330
|
+
getMessage(): string;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
declare class FailedTest {
|
|
334
|
+
private readonly fullTestNameParts;
|
|
335
|
+
private readonly error;
|
|
336
|
+
private constructor();
|
|
337
|
+
static create(fullTestNameParts: JavascriptIterable<string>, error: unknown): FailedTest;
|
|
338
|
+
getFullTestNameParts(): JavascriptIterable<string>;
|
|
339
|
+
getFullTestName(): string;
|
|
340
|
+
getError(): unknown;
|
|
341
|
+
getErrorMessage(): string;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
declare class SkippedTest {
|
|
345
|
+
private readonly skip;
|
|
346
|
+
private readonly fullTestNameParts;
|
|
347
|
+
private constructor();
|
|
348
|
+
static create(skip: TestSkip, fullTestNameParts: JavascriptIterable<string>): SkippedTest;
|
|
349
|
+
getSkipMessage(): string;
|
|
350
|
+
getFullTestNameParts(): JavascriptIterable<string>;
|
|
351
|
+
getFullTestName(): string;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
declare class TestAction {
|
|
355
|
+
private readonly parent;
|
|
356
|
+
private readonly name;
|
|
357
|
+
private readonly skip;
|
|
358
|
+
private readonly action;
|
|
359
|
+
private constructor();
|
|
360
|
+
static create(parent: TestAction | undefined, name: string, skip: TestSkip | undefined, action: () => (void | Promise<void>)): TestAction;
|
|
361
|
+
getParent(): TestAction | undefined;
|
|
362
|
+
getName(): string;
|
|
363
|
+
getFullNameParts(): JavascriptIterable<string>;
|
|
364
|
+
getFullName(): string;
|
|
365
|
+
getSkip(): TestSkip | undefined;
|
|
366
|
+
shouldSkip(): boolean;
|
|
367
|
+
getAction(): () => (void | Promise<void>);
|
|
368
|
+
runAsync(): void | Promise<void>;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
type ConsoleTestFunction = (runner: ConsoleTestRunner) => (void | Promise<void>);
|
|
372
|
+
type ConsoleTestFunctionContainer = {
|
|
373
|
+
test: ConsoleTestFunction;
|
|
374
|
+
};
|
|
375
|
+
declare class ConsoleTestRunner extends TestRunner {
|
|
376
|
+
private writeStream;
|
|
377
|
+
private readonly pendingActions;
|
|
378
|
+
private pendingActionsInsertIndex;
|
|
379
|
+
private currentTestAction;
|
|
380
|
+
private currentTest;
|
|
381
|
+
private passedTestCount;
|
|
382
|
+
private readonly skippedTests;
|
|
383
|
+
private readonly testFailures;
|
|
384
|
+
constructor();
|
|
385
|
+
static create(): ConsoleTestRunner;
|
|
386
|
+
static run(testFunction: ConsoleTestFunction | ConsoleTestFunctionContainer): Promise<void>;
|
|
387
|
+
static run(testFunctions: JavascriptIterable<ConsoleTestFunction | ConsoleTestFunctionContainer>): Promise<void>;
|
|
388
|
+
setWriteStream(writeStream: CharacterWriteStream): this;
|
|
389
|
+
/**
|
|
390
|
+
* Get the number of {@link TestAction}s that have yet to be executed.
|
|
391
|
+
*/
|
|
392
|
+
getPendingTestActionsCount(): number;
|
|
393
|
+
/**
|
|
394
|
+
* Get the index in the pending-{@link TestAction} stack that new {@link TestAction}s will be
|
|
395
|
+
* inserted at.
|
|
396
|
+
*/
|
|
397
|
+
getPendingTestActionsInsertIndex(): number;
|
|
398
|
+
/**
|
|
399
|
+
* Get the number of tests that have been skipped.
|
|
400
|
+
*/
|
|
401
|
+
getSkippedTestCount(): number;
|
|
402
|
+
getSkippedTests(): Iterable<SkippedTest>;
|
|
403
|
+
/**
|
|
404
|
+
* Get the number of tests that have passed.
|
|
405
|
+
*/
|
|
406
|
+
getPassedTestCount(): number;
|
|
407
|
+
getFailedTestCount(): number;
|
|
408
|
+
getFailedTests(): Iterable<FailedTest>;
|
|
409
|
+
/**
|
|
410
|
+
* Get the {@link TestAction} that is currently executing or undefined if no {@link TestAction}
|
|
411
|
+
* is executing.
|
|
412
|
+
*/
|
|
413
|
+
getCurrentTestAction(): TestAction | undefined;
|
|
414
|
+
getCurrentTest(): Test | undefined;
|
|
415
|
+
private assertNoCurrentTest;
|
|
416
|
+
beforeTest(fullTestNameParts: JavascriptIterable<string>): PromiseAsyncResult<void>;
|
|
417
|
+
afterPassedTest(): PromiseAsyncResult<void>;
|
|
418
|
+
afterSkippedTest(fullTestNameParts: JavascriptIterable<string>, skip: TestSkip | undefined): PromiseAsyncResult<void>;
|
|
419
|
+
afterFailedTest(fullTestNameParts: JavascriptIterable<string>, error: unknown): PromiseAsyncResult<void>;
|
|
420
|
+
testGroup(testGroupName: string, testAction: () => (void | Promise<void>)): void;
|
|
421
|
+
testGroup(testGroupName: string, skip: TestSkip | undefined, testAction: () => (void | Promise<void>)): void;
|
|
422
|
+
test(testName: string, testAction: (test: Test) => (void | Promise<void>)): void;
|
|
423
|
+
test(testName: string, skip: TestSkip | undefined, testAction: (test: Test) => (void | Promise<void>)): void;
|
|
424
|
+
runAsync(): Promise<void>;
|
|
425
|
+
printSummary(): PromiseAsyncResult<void>;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
export { AssertTest, BasicTestSkip, type ConsoleTestFunction, type ConsoleTestFunctionContainer, ConsoleTestRunner, FailedTest, SkippedTest, Test, TestAction, TestRunner, TestSkip, test };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AssertTest,
|
|
3
|
+
BasicTestSkip,
|
|
4
|
+
ConsoleTestRunner,
|
|
5
|
+
FailedTest,
|
|
6
|
+
SkippedTest,
|
|
7
|
+
Test,
|
|
8
|
+
TestAction,
|
|
9
|
+
TestRunner,
|
|
10
|
+
TestSkip,
|
|
11
|
+
test
|
|
12
|
+
} from "./chunk-CHBOMCYM.js";
|
|
13
|
+
import "./chunk-5Z677JON.js";
|
|
14
|
+
export {
|
|
15
|
+
AssertTest,
|
|
16
|
+
BasicTestSkip,
|
|
17
|
+
ConsoleTestRunner,
|
|
18
|
+
FailedTest,
|
|
19
|
+
SkippedTest,
|
|
20
|
+
Test,
|
|
21
|
+
TestAction,
|
|
22
|
+
TestRunner,
|
|
23
|
+
TestSkip,
|
|
24
|
+
test
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=testIndex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|