tstyche 4.3.0 → 5.0.0-beta.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/README.md +1 -1
- package/build/index.d.cts +0 -42
- package/build/index.d.ts +0 -42
- package/build/tstyche.d.ts +100 -92
- package/build/tstyche.js +1030 -861
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -74,7 +74,7 @@ Here is the list of all matchers:
|
|
|
74
74
|
|
|
75
75
|
## Runner
|
|
76
76
|
|
|
77
|
-
The `tstyche` command is the heart of TSTyche. For example, it can select test files by path, filter tests by name and
|
|
77
|
+
The `tstyche` command is the heart of TSTyche. For example, it can select test files by path, filter tests by name and to run the tests against specific versions of TypeScript:
|
|
78
78
|
|
|
79
79
|
```shell
|
|
80
80
|
tstyche query-params --only multiple --target '>=5.0 <5.3'
|
package/build/index.d.cts
CHANGED
|
@@ -168,20 +168,6 @@ interface Expect {
|
|
|
168
168
|
* @param source - The expression against which type the assertion is made.
|
|
169
169
|
*/
|
|
170
170
|
(source: unknown): Modifier;
|
|
171
|
-
fail: {
|
|
172
|
-
/**
|
|
173
|
-
* Mark an assertion as supposed to fail.
|
|
174
|
-
*
|
|
175
|
-
* @template Source - The type against which the assertion is made.
|
|
176
|
-
*/
|
|
177
|
-
<Source>(): Modifier;
|
|
178
|
-
/**
|
|
179
|
-
* Mark an assertion as supposed to fail.
|
|
180
|
-
*
|
|
181
|
-
* @param source - The expression against which type the assertion is made.
|
|
182
|
-
*/
|
|
183
|
-
(source: unknown): Modifier;
|
|
184
|
-
};
|
|
185
171
|
/**
|
|
186
172
|
* Marks an assertion as focused.
|
|
187
173
|
*/
|
|
@@ -198,20 +184,6 @@ interface Expect {
|
|
|
198
184
|
* @param source - The expression against which type the assertion is made.
|
|
199
185
|
*/
|
|
200
186
|
(source: unknown): Modifier;
|
|
201
|
-
fail: {
|
|
202
|
-
/**
|
|
203
|
-
* Mark an assertion as supposed to fail.
|
|
204
|
-
*
|
|
205
|
-
* @template Source - The type against which the assertion is made.
|
|
206
|
-
*/
|
|
207
|
-
<Source>(): Modifier;
|
|
208
|
-
/**
|
|
209
|
-
* Mark an assertion as supposed to fail.
|
|
210
|
-
*
|
|
211
|
-
* @param source - The expression against which type the assertion is made.
|
|
212
|
-
*/
|
|
213
|
-
(source: unknown): Modifier;
|
|
214
|
-
};
|
|
215
187
|
};
|
|
216
188
|
/**
|
|
217
189
|
* Marks an assertion as skipped.
|
|
@@ -229,20 +201,6 @@ interface Expect {
|
|
|
229
201
|
* @param source - The expression against which type the assertion is made.
|
|
230
202
|
*/
|
|
231
203
|
(source: unknown): Modifier;
|
|
232
|
-
fail: {
|
|
233
|
-
/**
|
|
234
|
-
* Marks an assertion as supposed to fail.
|
|
235
|
-
*
|
|
236
|
-
* @template Source - The type against which the assertion is made.
|
|
237
|
-
*/
|
|
238
|
-
<Source>(): Modifier;
|
|
239
|
-
/**
|
|
240
|
-
* Marks an assertion as supposed to fail.
|
|
241
|
-
*
|
|
242
|
-
* @param source - The expression against which type the assertion is made.
|
|
243
|
-
*/
|
|
244
|
-
(source: unknown): Modifier;
|
|
245
|
-
};
|
|
246
204
|
};
|
|
247
205
|
}
|
|
248
206
|
/**
|
package/build/index.d.ts
CHANGED
|
@@ -168,20 +168,6 @@ interface Expect {
|
|
|
168
168
|
* @param source - The expression against which type the assertion is made.
|
|
169
169
|
*/
|
|
170
170
|
(source: unknown): Modifier;
|
|
171
|
-
fail: {
|
|
172
|
-
/**
|
|
173
|
-
* Mark an assertion as supposed to fail.
|
|
174
|
-
*
|
|
175
|
-
* @template Source - The type against which the assertion is made.
|
|
176
|
-
*/
|
|
177
|
-
<Source>(): Modifier;
|
|
178
|
-
/**
|
|
179
|
-
* Mark an assertion as supposed to fail.
|
|
180
|
-
*
|
|
181
|
-
* @param source - The expression against which type the assertion is made.
|
|
182
|
-
*/
|
|
183
|
-
(source: unknown): Modifier;
|
|
184
|
-
};
|
|
185
171
|
/**
|
|
186
172
|
* Marks an assertion as focused.
|
|
187
173
|
*/
|
|
@@ -198,20 +184,6 @@ interface Expect {
|
|
|
198
184
|
* @param source - The expression against which type the assertion is made.
|
|
199
185
|
*/
|
|
200
186
|
(source: unknown): Modifier;
|
|
201
|
-
fail: {
|
|
202
|
-
/**
|
|
203
|
-
* Mark an assertion as supposed to fail.
|
|
204
|
-
*
|
|
205
|
-
* @template Source - The type against which the assertion is made.
|
|
206
|
-
*/
|
|
207
|
-
<Source>(): Modifier;
|
|
208
|
-
/**
|
|
209
|
-
* Mark an assertion as supposed to fail.
|
|
210
|
-
*
|
|
211
|
-
* @param source - The expression against which type the assertion is made.
|
|
212
|
-
*/
|
|
213
|
-
(source: unknown): Modifier;
|
|
214
|
-
};
|
|
215
187
|
};
|
|
216
188
|
/**
|
|
217
189
|
* Marks an assertion as skipped.
|
|
@@ -229,20 +201,6 @@ interface Expect {
|
|
|
229
201
|
* @param source - The expression against which type the assertion is made.
|
|
230
202
|
*/
|
|
231
203
|
(source: unknown): Modifier;
|
|
232
|
-
fail: {
|
|
233
|
-
/**
|
|
234
|
-
* Marks an assertion as supposed to fail.
|
|
235
|
-
*
|
|
236
|
-
* @template Source - The type against which the assertion is made.
|
|
237
|
-
*/
|
|
238
|
-
<Source>(): Modifier;
|
|
239
|
-
/**
|
|
240
|
-
* Marks an assertion as supposed to fail.
|
|
241
|
-
*
|
|
242
|
-
* @param source - The expression against which type the assertion is made.
|
|
243
|
-
*/
|
|
244
|
-
(source: unknown): Modifier;
|
|
245
|
-
};
|
|
246
204
|
};
|
|
247
205
|
}
|
|
248
206
|
/**
|
package/build/tstyche.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ interface CommandLineOptions {
|
|
|
40
40
|
watch?: boolean;
|
|
41
41
|
}
|
|
42
42
|
interface ConfigFileOptions {
|
|
43
|
-
|
|
43
|
+
checkDeclarationFiles?: boolean;
|
|
44
44
|
checkSuppressedErrors?: boolean;
|
|
45
45
|
failFast?: boolean;
|
|
46
46
|
fixtureFileMatch?: Array<string>;
|
|
@@ -54,6 +54,7 @@ interface ConfigFileOptions {
|
|
|
54
54
|
tsconfig?: string;
|
|
55
55
|
}
|
|
56
56
|
interface InlineConfig {
|
|
57
|
+
fixme?: boolean;
|
|
57
58
|
if?: {
|
|
58
59
|
target?: Array<string>;
|
|
59
60
|
};
|
|
@@ -63,6 +64,17 @@ interface ResolvedConfig extends Omit<CommandLineOptions, "config" | keyof Confi
|
|
|
63
64
|
configFilePath: string;
|
|
64
65
|
pathMatch: Array<string>;
|
|
65
66
|
}
|
|
67
|
+
interface TextRange {
|
|
68
|
+
start: number;
|
|
69
|
+
end: number;
|
|
70
|
+
text: string;
|
|
71
|
+
}
|
|
72
|
+
interface DirectiveRange {
|
|
73
|
+
sourceFile: ts.SourceFile;
|
|
74
|
+
namespace: TextRange;
|
|
75
|
+
directive?: TextRange;
|
|
76
|
+
argument?: TextRange;
|
|
77
|
+
}
|
|
66
78
|
|
|
67
79
|
declare class Config {
|
|
68
80
|
#private;
|
|
@@ -85,9 +97,10 @@ declare class Config {
|
|
|
85
97
|
|
|
86
98
|
declare enum OptionBrand {
|
|
87
99
|
String = "string",
|
|
100
|
+
SemverRange = "range",
|
|
88
101
|
Number = "number",
|
|
89
102
|
Boolean = "boolean",
|
|
90
|
-
|
|
103
|
+
True = "true",
|
|
91
104
|
List = "list"
|
|
92
105
|
}
|
|
93
106
|
|
|
@@ -99,34 +112,22 @@ declare class ConfigDiagnosticText {
|
|
|
99
112
|
static fileMatchPatternCannotStartWith(optionName: string, segment: string): Array<string>;
|
|
100
113
|
static inspectSupportedVersions(): string;
|
|
101
114
|
static moduleWasNotFound(specifier: string): string;
|
|
115
|
+
static optionValueMustBe(optionName: string, optionBrand: OptionBrand): string;
|
|
102
116
|
static rangeIsNotValid(value: string): string;
|
|
117
|
+
static rangeDoesNotMatchSupported(value: string): string;
|
|
103
118
|
static rangeUsage(): Array<string>;
|
|
104
|
-
static requiresValueType(optionName: string, optionBrand: OptionBrand): string;
|
|
105
119
|
static seen(element: string): string;
|
|
106
120
|
static unexpected(element: string): string;
|
|
107
121
|
static unknownOption(optionName: string): string;
|
|
108
|
-
static usage(optionName: string, optionBrand: OptionBrand): Array<string>;
|
|
109
122
|
static versionIsNotSupported(value: string): string;
|
|
110
123
|
static watchCannotBeEnabled(): string;
|
|
111
124
|
}
|
|
112
125
|
|
|
113
|
-
interface TextRange {
|
|
114
|
-
start: number;
|
|
115
|
-
end: number;
|
|
116
|
-
text: string;
|
|
117
|
-
}
|
|
118
|
-
interface DirectiveRange {
|
|
119
|
-
namespace: TextRange;
|
|
120
|
-
directive?: TextRange;
|
|
121
|
-
argument?: TextRange;
|
|
122
|
-
}
|
|
123
|
-
type DirectiveRanges = Array<DirectiveRange> & {
|
|
124
|
-
sourceFile: ts.SourceFile;
|
|
125
|
-
};
|
|
126
126
|
declare class Directive {
|
|
127
127
|
#private;
|
|
128
|
-
static
|
|
129
|
-
static
|
|
128
|
+
static getDirectiveRange(compiler: typeof ts, owner: TestTreeNode, directiveText: string): DirectiveRange | undefined;
|
|
129
|
+
static getDirectiveRanges(compiler: typeof ts, node: ts.Node): Array<DirectiveRange> | undefined;
|
|
130
|
+
static getInlineConfig(ranges: Array<DirectiveRange> | DirectiveRange | undefined): Promise<InlineConfig | undefined>;
|
|
130
131
|
}
|
|
131
132
|
|
|
132
133
|
declare const defaultOptions: Required<ConfigFileOptions>;
|
|
@@ -155,15 +156,21 @@ declare class SourceFile {
|
|
|
155
156
|
};
|
|
156
157
|
}
|
|
157
158
|
|
|
159
|
+
declare class SourceService {
|
|
160
|
+
#private;
|
|
161
|
+
static get(source: SourceFile | ts.SourceFile): SourceFile | ts.SourceFile;
|
|
162
|
+
static set(source: SourceFile | ts.SourceFile): void;
|
|
163
|
+
}
|
|
164
|
+
|
|
158
165
|
declare class DiagnosticOrigin {
|
|
159
|
-
|
|
166
|
+
assertionNode: ExpectNode | undefined;
|
|
160
167
|
end: number;
|
|
161
168
|
sourceFile: SourceFile | ts.SourceFile;
|
|
162
169
|
start: number;
|
|
163
|
-
constructor(start: number, end: number, sourceFile: SourceFile | ts.SourceFile,
|
|
164
|
-
static fromAssertion(
|
|
165
|
-
static fromNode(node: ts.Node,
|
|
166
|
-
static fromNodes(nodes: ts.NodeArray<ts.Node>,
|
|
170
|
+
constructor(start: number, end: number, sourceFile: SourceFile | ts.SourceFile, assertionNode?: ExpectNode);
|
|
171
|
+
static fromAssertion(assertionNode: ExpectNode): DiagnosticOrigin;
|
|
172
|
+
static fromNode(node: ts.Node, assertionNode?: ExpectNode): DiagnosticOrigin;
|
|
173
|
+
static fromNodes(nodes: ts.NodeArray<ts.Node>, assertionNode?: ExpectNode): DiagnosticOrigin;
|
|
167
174
|
}
|
|
168
175
|
|
|
169
176
|
declare class Diagnostic {
|
|
@@ -179,7 +186,7 @@ declare class Diagnostic {
|
|
|
179
186
|
}): this;
|
|
180
187
|
static error(text: string | Array<string>, origin?: DiagnosticOrigin): Diagnostic;
|
|
181
188
|
extendWith(text: string | Array<string>, origin?: DiagnosticOrigin): Diagnostic;
|
|
182
|
-
static fromDiagnostics(diagnostics: Array<ts.Diagnostic
|
|
189
|
+
static fromDiagnostics(diagnostics: Array<ts.Diagnostic>): Array<Diagnostic>;
|
|
183
190
|
static warning(text: string | Array<string>, origin?: DiagnosticOrigin): Diagnostic;
|
|
184
191
|
}
|
|
185
192
|
|
|
@@ -197,7 +204,7 @@ interface BaseOptionDefinition {
|
|
|
197
204
|
name: string;
|
|
198
205
|
}
|
|
199
206
|
interface PrimitiveTypeOptionDefinition extends BaseOptionDefinition {
|
|
200
|
-
brand: OptionBrand.String | OptionBrand.Number | OptionBrand.Boolean | OptionBrand.
|
|
207
|
+
brand: OptionBrand.String | OptionBrand.SemverRange | OptionBrand.Number | OptionBrand.Boolean | OptionBrand.True;
|
|
201
208
|
}
|
|
202
209
|
interface ItemDefinition {
|
|
203
210
|
brand: OptionBrand.String;
|
|
@@ -212,7 +219,16 @@ declare class Options {
|
|
|
212
219
|
#private;
|
|
213
220
|
static for(optionGroup: OptionGroup): Map<string, OptionDefinition>;
|
|
214
221
|
static resolve(optionName: string, optionValue: string, rootPath?: string): string;
|
|
215
|
-
static validate(optionName: string, optionValue: string,
|
|
222
|
+
static validate(optionName: string, optionValue: string, onDiagnostics: DiagnosticsHandler, origin?: DiagnosticOrigin): Promise<void>;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
declare class ProjectService {
|
|
226
|
+
#private;
|
|
227
|
+
constructor(compiler: typeof ts, resolvedConfig: ResolvedConfig);
|
|
228
|
+
closeFile(filePath: string): void;
|
|
229
|
+
getDefaultProject(filePath: string): ts.server.Project | undefined;
|
|
230
|
+
getLanguageService(filePath: string): ts.LanguageService | undefined;
|
|
231
|
+
openFile(filePath: string, sourceText?: string | undefined, projectRootPath?: string | undefined): void;
|
|
216
232
|
}
|
|
217
233
|
|
|
218
234
|
declare enum TestTreeNodeBrand {
|
|
@@ -224,10 +240,9 @@ declare enum TestTreeNodeBrand {
|
|
|
224
240
|
|
|
225
241
|
declare enum TestTreeNodeFlags {
|
|
226
242
|
None = 0,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
Todo = 8
|
|
243
|
+
Only = 1,
|
|
244
|
+
Skip = 2,
|
|
245
|
+
Todo = 4
|
|
231
246
|
}
|
|
232
247
|
|
|
233
248
|
declare class WhenNode extends TestTreeNode {
|
|
@@ -240,14 +255,25 @@ declare class WhenNode extends TestTreeNode {
|
|
|
240
255
|
|
|
241
256
|
declare class TestTreeNode {
|
|
242
257
|
brand: TestTreeNodeBrand;
|
|
243
|
-
children: Array<TestTreeNode |
|
|
258
|
+
children: Array<TestTreeNode | ExpectNode | WhenNode>;
|
|
244
259
|
diagnostics: Set<ts.Diagnostic>;
|
|
245
260
|
flags: TestTreeNodeFlags;
|
|
246
261
|
name: string;
|
|
247
262
|
node: ts.CallExpression;
|
|
248
263
|
parent: TestTree | TestTreeNode;
|
|
249
264
|
constructor(compiler: typeof ts, brand: TestTreeNodeBrand, node: ts.CallExpression, parent: TestTree | TestTreeNode, flags: TestTreeNodeFlags);
|
|
250
|
-
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
declare class ExpectNode extends TestTreeNode {
|
|
268
|
+
abilityDiagnostics: Set<ts.Diagnostic>;
|
|
269
|
+
isNot: boolean;
|
|
270
|
+
matcherNode: ts.CallExpression | ts.Decorator;
|
|
271
|
+
matcherNameNode: ts.PropertyAccessExpression;
|
|
272
|
+
modifierNode: ts.PropertyAccessExpression;
|
|
273
|
+
notNode: ts.PropertyAccessExpression | undefined;
|
|
274
|
+
source: ts.NodeArray<ts.Expression> | ts.NodeArray<ts.TypeNode>;
|
|
275
|
+
target: ts.NodeArray<ts.Expression> | ts.NodeArray<ts.TypeNode> | undefined;
|
|
276
|
+
constructor(compiler: typeof ts, brand: TestTreeNodeBrand, node: ts.CallExpression, parent: TestTree | TestTreeNode, flags: TestTreeNodeFlags, matcherNode: ts.CallExpression | ts.Decorator, matcherNameNode: ts.PropertyAccessExpression, modifierNode: ts.PropertyAccessExpression, notNode: ts.PropertyAccessExpression | undefined);
|
|
251
277
|
}
|
|
252
278
|
|
|
253
279
|
interface SuppressedError {
|
|
@@ -256,39 +282,14 @@ interface SuppressedError {
|
|
|
256
282
|
argument?: TextRange;
|
|
257
283
|
diagnostics: Array<ts.Diagnostic>;
|
|
258
284
|
}
|
|
259
|
-
type SuppressedErrors = Array<SuppressedError> & {
|
|
260
|
-
sourceFile: ts.SourceFile;
|
|
261
|
-
};
|
|
262
285
|
|
|
263
286
|
declare class TestTree {
|
|
264
|
-
children: Array<TestTreeNode |
|
|
287
|
+
children: Array<TestTreeNode | ExpectNode | WhenNode>;
|
|
265
288
|
diagnostics: Set<ts.Diagnostic>;
|
|
266
289
|
hasOnly: boolean;
|
|
267
290
|
sourceFile: ts.SourceFile;
|
|
268
|
-
suppressedErrors:
|
|
291
|
+
suppressedErrors: Array<SuppressedError> | undefined;
|
|
269
292
|
constructor(diagnostics: Set<ts.Diagnostic>, sourceFile: ts.SourceFile);
|
|
270
|
-
getDirectiveRanges(compiler: typeof ts): DirectiveRanges | undefined;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
declare class AssertionNode extends TestTreeNode {
|
|
274
|
-
abilityDiagnostics: Set<ts.Diagnostic>;
|
|
275
|
-
isNot: boolean;
|
|
276
|
-
matcherNode: ts.CallExpression | ts.Decorator;
|
|
277
|
-
matcherNameNode: ts.PropertyAccessExpression;
|
|
278
|
-
modifierNode: ts.PropertyAccessExpression;
|
|
279
|
-
notNode: ts.PropertyAccessExpression | undefined;
|
|
280
|
-
source: ts.NodeArray<ts.Expression> | ts.NodeArray<ts.TypeNode>;
|
|
281
|
-
target: ts.NodeArray<ts.Expression> | ts.NodeArray<ts.TypeNode> | undefined;
|
|
282
|
-
constructor(compiler: typeof ts, brand: TestTreeNodeBrand, node: ts.CallExpression, parent: TestTree | TestTreeNode, flags: TestTreeNodeFlags, matcherNode: ts.CallExpression | ts.Decorator, matcherNameNode: ts.PropertyAccessExpression, modifierNode: ts.PropertyAccessExpression, notNode: ts.PropertyAccessExpression | undefined);
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
declare class ProjectService {
|
|
286
|
-
#private;
|
|
287
|
-
constructor(compiler: typeof ts, resolvedConfig: ResolvedConfig);
|
|
288
|
-
closeFile(filePath: string): void;
|
|
289
|
-
getDefaultProject(filePath: string): ts.server.Project | undefined;
|
|
290
|
-
getLanguageService(filePath: string): ts.LanguageService | undefined;
|
|
291
|
-
openFile(filePath: string, sourceText?: string | undefined, projectRootPath?: string | undefined): void;
|
|
292
293
|
}
|
|
293
294
|
|
|
294
295
|
declare class CollectService {
|
|
@@ -354,22 +355,24 @@ declare enum ResultStatus {
|
|
|
354
355
|
Passed = "passed",
|
|
355
356
|
Failed = "failed",
|
|
356
357
|
Skipped = "skipped",
|
|
358
|
+
Fixme = "fixme",
|
|
357
359
|
Todo = "todo"
|
|
358
360
|
}
|
|
359
361
|
|
|
360
362
|
declare class ExpectResult {
|
|
361
|
-
|
|
363
|
+
expect: ExpectNode;
|
|
362
364
|
diagnostics: Array<Diagnostic>;
|
|
363
365
|
parent: TestResult | undefined;
|
|
364
366
|
status: ResultStatus;
|
|
365
367
|
timing: ResultTiming;
|
|
366
|
-
constructor(
|
|
368
|
+
constructor(expect: ExpectNode, parent?: TestResult);
|
|
367
369
|
}
|
|
368
370
|
|
|
369
371
|
declare class ResultCount {
|
|
370
372
|
failed: number;
|
|
371
373
|
passed: number;
|
|
372
374
|
skipped: number;
|
|
375
|
+
fixme: number;
|
|
373
376
|
todo: number;
|
|
374
377
|
get total(): number;
|
|
375
378
|
}
|
|
@@ -393,52 +396,52 @@ declare class DescribeResult {
|
|
|
393
396
|
constructor(describe: TestTreeNode, parent?: DescribeResult);
|
|
394
397
|
}
|
|
395
398
|
|
|
396
|
-
declare class
|
|
399
|
+
declare class FileLocation {
|
|
397
400
|
#private;
|
|
398
|
-
|
|
401
|
+
path: string;
|
|
399
402
|
position: number | undefined;
|
|
400
|
-
constructor(
|
|
403
|
+
constructor(file: string | URL, position?: number);
|
|
401
404
|
}
|
|
402
405
|
|
|
403
|
-
type
|
|
404
|
-
declare class
|
|
406
|
+
type FileResultStatus = ResultStatus.Runs | ResultStatus.Passed | ResultStatus.Failed;
|
|
407
|
+
declare class FileResult {
|
|
405
408
|
diagnostics: Array<Diagnostic>;
|
|
406
409
|
expectCount: ResultCount;
|
|
410
|
+
file: FileLocation;
|
|
407
411
|
results: Array<DescribeResult | TestResult | ExpectResult>;
|
|
408
|
-
status:
|
|
409
|
-
task: Task;
|
|
412
|
+
status: FileResultStatus;
|
|
410
413
|
testCount: ResultCount;
|
|
411
414
|
timing: ResultTiming;
|
|
412
|
-
constructor(
|
|
415
|
+
constructor(file: FileLocation);
|
|
413
416
|
}
|
|
414
417
|
|
|
415
418
|
declare class ProjectResult {
|
|
416
419
|
compilerVersion: string;
|
|
417
420
|
diagnostics: Array<Diagnostic>;
|
|
418
421
|
projectConfigFilePath: string | undefined;
|
|
419
|
-
results: Array<
|
|
422
|
+
results: Array<FileResult>;
|
|
420
423
|
constructor(compilerVersion: string, projectConfigFilePath: string | undefined);
|
|
421
424
|
}
|
|
422
425
|
|
|
423
426
|
type TargetResultStatus = ResultStatus.Runs | ResultStatus.Passed | ResultStatus.Failed;
|
|
424
427
|
declare class TargetResult {
|
|
428
|
+
files: Array<FileLocation>;
|
|
425
429
|
results: Map<string | undefined, ProjectResult>;
|
|
426
430
|
status: TargetResultStatus;
|
|
427
431
|
target: string;
|
|
428
|
-
tasks: Array<Task>;
|
|
429
432
|
timing: ResultTiming;
|
|
430
|
-
constructor(target: string,
|
|
433
|
+
constructor(target: string, files: Array<FileLocation>);
|
|
431
434
|
}
|
|
432
435
|
|
|
433
436
|
declare class Result {
|
|
434
437
|
expectCount: ResultCount;
|
|
435
438
|
fileCount: ResultCount;
|
|
439
|
+
files: Array<FileLocation>;
|
|
436
440
|
results: Array<TargetResult>;
|
|
437
441
|
targetCount: ResultCount;
|
|
438
|
-
tasks: Array<Task>;
|
|
439
442
|
testCount: ResultCount;
|
|
440
443
|
timing: ResultTiming;
|
|
441
|
-
constructor(
|
|
444
|
+
constructor(files: Array<FileLocation>);
|
|
442
445
|
}
|
|
443
446
|
|
|
444
447
|
interface EventHandler {
|
|
@@ -466,13 +469,13 @@ type Event = ["config:error", {
|
|
|
466
469
|
projectConfigFilePath: string | undefined;
|
|
467
470
|
}] | ["project:error", {
|
|
468
471
|
diagnostics: Array<Diagnostic>;
|
|
469
|
-
}] | ["
|
|
470
|
-
result:
|
|
471
|
-
}] | ["
|
|
472
|
+
}] | ["file:start", {
|
|
473
|
+
result: FileResult;
|
|
474
|
+
}] | ["file:error", {
|
|
472
475
|
diagnostics: Array<Diagnostic>;
|
|
473
|
-
result:
|
|
474
|
-
}] | ["
|
|
475
|
-
result:
|
|
476
|
+
result: FileResult;
|
|
477
|
+
}] | ["file:end", {
|
|
478
|
+
result: FileResult;
|
|
476
479
|
}] | ["directive:error", {
|
|
477
480
|
diagnostics: Array<Diagnostic>;
|
|
478
481
|
}] | ["collect:start", {
|
|
@@ -480,7 +483,7 @@ type Event = ["config:error", {
|
|
|
480
483
|
}] | ["collect:error", {
|
|
481
484
|
diagnostics: Array<Diagnostic>;
|
|
482
485
|
}] | ["collect:node", {
|
|
483
|
-
node: TestTreeNode |
|
|
486
|
+
node: TestTreeNode | ExpectNode | WhenNode;
|
|
484
487
|
}] | ["collect:end", {
|
|
485
488
|
tree: TestTree;
|
|
486
489
|
}] | ["describe:start", {
|
|
@@ -498,6 +501,8 @@ type Event = ["config:error", {
|
|
|
498
501
|
result: TestResult;
|
|
499
502
|
}] | ["test:skip", {
|
|
500
503
|
result: TestResult;
|
|
504
|
+
}] | ["test:fixme", {
|
|
505
|
+
result: TestResult;
|
|
501
506
|
}] | ["test:todo", {
|
|
502
507
|
result: TestResult;
|
|
503
508
|
}] | ["expect:start", {
|
|
@@ -512,6 +517,8 @@ type Event = ["config:error", {
|
|
|
512
517
|
result: ExpectResult;
|
|
513
518
|
}] | ["expect:skip", {
|
|
514
519
|
result: ExpectResult;
|
|
520
|
+
}] | ["expect:fixme", {
|
|
521
|
+
result: ExpectResult;
|
|
515
522
|
}] | ["watch:error", {
|
|
516
523
|
diagnostics: Array<Diagnostic>;
|
|
517
524
|
}];
|
|
@@ -556,7 +563,7 @@ declare class ExpectService {
|
|
|
556
563
|
private toHaveProperty;
|
|
557
564
|
private toRaiseError;
|
|
558
565
|
constructor(compiler: typeof ts, typeChecker: TypeChecker, reject: Reject);
|
|
559
|
-
match(
|
|
566
|
+
match(assertionNode: ExpectNode, onDiagnostics: DiagnosticsHandler<Diagnostic | Array<Diagnostic>>): MatchResult | undefined;
|
|
560
567
|
}
|
|
561
568
|
|
|
562
569
|
declare class Glob {
|
|
@@ -654,6 +661,8 @@ interface CodeFrameOptions {
|
|
|
654
661
|
|
|
655
662
|
declare function diagnosticText(diagnostic: Diagnostic, codeFrameOptions?: CodeFrameOptions): ScribblerJsx.Element;
|
|
656
663
|
|
|
664
|
+
declare function fileStatusText(status: FileResultStatus, file: FileLocation): ScribblerJsx.Element;
|
|
665
|
+
|
|
657
666
|
declare function fileViewText(lines: Array<ScribblerJsx.Element>, addEmptyFinalLine: boolean): ScribblerJsx.Element;
|
|
658
667
|
|
|
659
668
|
declare function formattedText(input: string | Array<string> | Record<string, unknown>): ScribblerJsx.Element;
|
|
@@ -677,9 +686,7 @@ declare function summaryText({ duration, expectCount, fileCount, targetCount, te
|
|
|
677
686
|
testCount: ResultCount;
|
|
678
687
|
}): ScribblerJsx.Element;
|
|
679
688
|
|
|
680
|
-
declare function
|
|
681
|
-
|
|
682
|
-
declare function testNameText(status: "fail" | "pass" | "skip" | "todo", name: string, indent?: number): ScribblerJsx.Element;
|
|
689
|
+
declare function testNameText(status: "fail" | "pass" | "skip" | "fixme" | "todo", name: string, indent?: number): ScribblerJsx.Element;
|
|
683
690
|
|
|
684
691
|
declare function usesCompilerText(compilerVersion: string, projectConfigFilePath: string | undefined, options?: {
|
|
685
692
|
prependEmptyLine: boolean;
|
|
@@ -718,7 +725,7 @@ declare class Runner {
|
|
|
718
725
|
#private;
|
|
719
726
|
static version: string;
|
|
720
727
|
constructor(resolvedConfig: ResolvedConfig);
|
|
721
|
-
run(
|
|
728
|
+
run(files: Array<string | URL | FileLocation>, cancellationToken?: CancellationToken): Promise<void>;
|
|
722
729
|
}
|
|
723
730
|
|
|
724
731
|
declare class Select {
|
|
@@ -779,7 +786,8 @@ declare class Store {
|
|
|
779
786
|
}
|
|
780
787
|
|
|
781
788
|
declare class SuppressedService {
|
|
782
|
-
|
|
789
|
+
#private;
|
|
790
|
+
match(testTree: TestTree, onDiagnostics: DiagnosticsHandler<Array<Diagnostic>>): void;
|
|
783
791
|
}
|
|
784
792
|
|
|
785
793
|
declare class Version {
|
|
@@ -807,8 +815,8 @@ declare class FileWatcher extends Watcher {
|
|
|
807
815
|
|
|
808
816
|
declare class WatchService {
|
|
809
817
|
#private;
|
|
810
|
-
constructor(resolvedConfig: ResolvedConfig,
|
|
811
|
-
watch(cancellationToken: CancellationToken): AsyncIterable<Array<
|
|
818
|
+
constructor(resolvedConfig: ResolvedConfig, files: Array<FileLocation>);
|
|
819
|
+
watch(cancellationToken: CancellationToken): AsyncIterable<Array<FileLocation>>;
|
|
812
820
|
}
|
|
813
821
|
|
|
814
822
|
declare class WhenService {
|
|
@@ -817,5 +825,5 @@ declare class WhenService {
|
|
|
817
825
|
action(when: WhenNode): void;
|
|
818
826
|
}
|
|
819
827
|
|
|
820
|
-
export {
|
|
821
|
-
export type { CodeFrameOptions, CommandLineOptions, ConfigFileOptions, DiagnosticsHandler, DirectiveRange,
|
|
828
|
+
export { BaseReporter, CancellationHandler, CancellationReason, CancellationToken, Cli, CollectService, Color, Config, ConfigDiagnosticText, DescribeResult, Diagnostic, DiagnosticCategory, DiagnosticOrigin, Directive, EventEmitter, ExitCodeHandler, ExpectNode, ExpectResult, ExpectService, FileLocation, FileResult, FileWatcher, Glob, InputService, Line, ListReporter, OptionBrand, OptionGroup, Options, OutputService, Path, PluginService, ProjectResult, ProjectService, Reject, Result, ResultCount, ResultHandler, ResultStatus, ResultTiming, Runner, Scribbler, ScribblerJsx, Select, SelectDiagnosticText, SetupReporter, SourceFile, SourceService, Store, SummaryReporter, SuppressedService, TargetResult, TestResult, TestTree, TestTreeNode, TestTreeNodeBrand, TestTreeNodeFlags, Text, Version, WatchReporter, WatchService, Watcher, WhenNode, WhenService, addsPackageText, argumentIsProvided, argumentOrTypeArgumentIsProvided, defaultOptions, describeNameText, diagnosticBelongsToNode, diagnosticText, environmentOptions, fileStatusText, fileViewText, formattedText, getDiagnosticMessageText, getTextSpanEnd, helpText, isDiagnosticWithLocation, nodeBelongsToArgumentList, summaryText, testNameText, usesCompilerText, waitingForFileChangesText, watchUsageText };
|
|
829
|
+
export type { CodeFrameOptions, CommandLineOptions, ConfigFileOptions, DiagnosticsHandler, DirectiveRange, EnvironmentOptions, Event, EventHandler, FileResultStatus, FileWatchHandler, InlineConfig, InputHandler, ItemDefinition, MatchResult, OptionDefinition, Plugin, Reporter, ReporterEvent, ResolvedConfig, ScribblerOptions, SelectHookContext, SuppressedError, TargetResultStatus, TextRange, TypeChecker, WatchHandler, WatcherOptions };
|