tstyche 2.0.0-rc.2 → 2.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/README.md +1 -1
- package/build/tstyche.d.ts +112 -107
- package/build/tstyche.js +1669 -1673
- package/package.json +1 -1
package/README.md
CHANGED
package/build/tstyche.d.ts
CHANGED
|
@@ -156,6 +156,19 @@ interface CommandLineOptions {
|
|
|
156
156
|
watch?: boolean;
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
+
declare class ConfigDiagnosticText {
|
|
160
|
+
#private;
|
|
161
|
+
static doubleQuotesExpected(): string;
|
|
162
|
+
static expectsListItemType(optionName: string, optionBrand: OptionBrand): string;
|
|
163
|
+
static expectsValue(optionName: string, optionGroup: OptionGroup): string;
|
|
164
|
+
static fileDoesNotExist(filePath: string): string;
|
|
165
|
+
static testFileMatchCannotStartWith(segment: string): Array<string>;
|
|
166
|
+
static requiresValueType(optionName: string, optionBrand: OptionBrand, optionGroup: OptionGroup): string;
|
|
167
|
+
static unknownOption(optionName: string): string;
|
|
168
|
+
static versionIsNotSupported(value: string): string;
|
|
169
|
+
static watchCannotBeEnabled(): string;
|
|
170
|
+
}
|
|
171
|
+
|
|
159
172
|
/**
|
|
160
173
|
* Options loaded from the configuration file.
|
|
161
174
|
*/
|
|
@@ -197,22 +210,6 @@ declare class ConfigService {
|
|
|
197
210
|
resolveConfig(): ResolvedConfig;
|
|
198
211
|
}
|
|
199
212
|
|
|
200
|
-
declare class OptionDiagnosticText {
|
|
201
|
-
#private;
|
|
202
|
-
static doubleQuotesExpected(): string;
|
|
203
|
-
static expectsListItemType(optionName: string, optionBrand: OptionBrand): string;
|
|
204
|
-
static expectsValue(optionName: string, optionGroup: OptionGroup): string;
|
|
205
|
-
static fileDoesNotExist(filePath: string): string;
|
|
206
|
-
static noTestFilesWereLeft(resolvedConfig: ResolvedConfig): Array<string>;
|
|
207
|
-
static noTestFilesWereSelected(resolvedConfig: ResolvedConfig): Array<string>;
|
|
208
|
-
static testFileMatchCannotStartWith(segment: string): Array<string>;
|
|
209
|
-
static requiresValueType(optionName: string, optionBrand: OptionBrand, optionGroup: OptionGroup): string;
|
|
210
|
-
static unknownOption(optionName: string): string;
|
|
211
|
-
static versionIsNotSupported(value: string): string;
|
|
212
|
-
static watchCannotBeEnabledInCiEnvironment(): string;
|
|
213
|
-
static watchIsNotAvailable(): string;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
213
|
declare enum Color {
|
|
217
214
|
Reset = "0",
|
|
218
215
|
Red = "31",
|
|
@@ -430,85 +427,6 @@ declare class Result {
|
|
|
430
427
|
constructor(resolvedConfig: ResolvedConfig, testFiles: Array<TestFile>);
|
|
431
428
|
}
|
|
432
429
|
|
|
433
|
-
type Event = ["config:error", {
|
|
434
|
-
diagnostics: Array<Diagnostic>;
|
|
435
|
-
}] | ["deprecation:info", {
|
|
436
|
-
diagnostics: Array<Diagnostic>;
|
|
437
|
-
}] | ["select:error", {
|
|
438
|
-
diagnostics: Array<Diagnostic>;
|
|
439
|
-
}] | ["run:start", {
|
|
440
|
-
result: Result;
|
|
441
|
-
}] | ["run:end", {
|
|
442
|
-
result: Result;
|
|
443
|
-
}] | ["store:info", {
|
|
444
|
-
compilerVersion: string;
|
|
445
|
-
installationPath: string;
|
|
446
|
-
}] | ["store:error", {
|
|
447
|
-
diagnostics: Array<Diagnostic>;
|
|
448
|
-
}] | ["target:start", {
|
|
449
|
-
result: TargetResult;
|
|
450
|
-
}] | ["target:end", {
|
|
451
|
-
result: TargetResult;
|
|
452
|
-
}] | ["project:info", {
|
|
453
|
-
compilerVersion: string;
|
|
454
|
-
projectConfigFilePath: string | undefined;
|
|
455
|
-
}] | ["project:error", {
|
|
456
|
-
diagnostics: Array<Diagnostic>;
|
|
457
|
-
}] | ["file:start", {
|
|
458
|
-
result: FileResult;
|
|
459
|
-
}] | ["file:error", {
|
|
460
|
-
diagnostics: Array<Diagnostic>;
|
|
461
|
-
result: FileResult;
|
|
462
|
-
}] | ["file:end", {
|
|
463
|
-
result: FileResult;
|
|
464
|
-
}] | ["describe:start", {
|
|
465
|
-
result: DescribeResult;
|
|
466
|
-
}] | ["describe:end", {
|
|
467
|
-
result: DescribeResult;
|
|
468
|
-
}] | ["test:start", {
|
|
469
|
-
result: TestResult;
|
|
470
|
-
}] | ["test:error", {
|
|
471
|
-
diagnostics: Array<Diagnostic>;
|
|
472
|
-
result: TestResult;
|
|
473
|
-
}] | ["test:fail", {
|
|
474
|
-
result: TestResult;
|
|
475
|
-
}] | ["test:pass", {
|
|
476
|
-
result: TestResult;
|
|
477
|
-
}] | ["test:skip", {
|
|
478
|
-
result: TestResult;
|
|
479
|
-
}] | ["test:todo", {
|
|
480
|
-
result: TestResult;
|
|
481
|
-
}] | ["expect:start", {
|
|
482
|
-
result: ExpectResult;
|
|
483
|
-
}] | ["expect:error", {
|
|
484
|
-
diagnostics: Array<Diagnostic>;
|
|
485
|
-
result: ExpectResult;
|
|
486
|
-
}] | ["expect:fail", {
|
|
487
|
-
diagnostics: Array<Diagnostic>;
|
|
488
|
-
result: ExpectResult;
|
|
489
|
-
}] | ["expect:pass", {
|
|
490
|
-
result: ExpectResult;
|
|
491
|
-
}] | ["expect:skip", {
|
|
492
|
-
result: ExpectResult;
|
|
493
|
-
}] | ["watch:error", {
|
|
494
|
-
diagnostics: Array<Diagnostic>;
|
|
495
|
-
}];
|
|
496
|
-
interface EventHandler {
|
|
497
|
-
handleEvent: (event: Event) => void;
|
|
498
|
-
}
|
|
499
|
-
declare class EventEmitter {
|
|
500
|
-
#private;
|
|
501
|
-
addHandler(handler: EventHandler): void;
|
|
502
|
-
static dispatch(event: Event): void;
|
|
503
|
-
removeHandler(handler: EventHandler): void;
|
|
504
|
-
removeHandlers(): void;
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
declare class ResultHandler {
|
|
508
|
-
#private;
|
|
509
|
-
handleEvent([eventName, payload]: Event): void;
|
|
510
|
-
}
|
|
511
|
-
|
|
512
430
|
declare function fileStatusText(status: FileResultStatus, testFile: TestFile): ScribblerJsx.Element;
|
|
513
431
|
|
|
514
432
|
declare function fileViewText(lines: Array<ScribblerJsx.Element>, addEmptyFinalLine: boolean): ScribblerJsx.Element;
|
|
@@ -556,6 +474,12 @@ declare function waitingForFileChangesText(): ScribblerJsx.Element;
|
|
|
556
474
|
|
|
557
475
|
declare function watchUsageText(): ScribblerJsx.Element;
|
|
558
476
|
|
|
477
|
+
declare class SelectDiagnosticText {
|
|
478
|
+
#private;
|
|
479
|
+
static noTestFilesWereLeft(resolvedConfig: ResolvedConfig): Array<string>;
|
|
480
|
+
static noTestFilesWereSelected(resolvedConfig: ResolvedConfig): Array<string>;
|
|
481
|
+
}
|
|
482
|
+
|
|
559
483
|
declare class SelectService {
|
|
560
484
|
#private;
|
|
561
485
|
constructor(resolvedConfig: ResolvedConfig);
|
|
@@ -604,6 +528,81 @@ declare class Environment {
|
|
|
604
528
|
static get typescriptPath(): string | undefined;
|
|
605
529
|
}
|
|
606
530
|
|
|
531
|
+
type Event = ["config:error", {
|
|
532
|
+
diagnostics: Array<Diagnostic>;
|
|
533
|
+
}] | ["deprecation:info", {
|
|
534
|
+
diagnostics: Array<Diagnostic>;
|
|
535
|
+
}] | ["select:error", {
|
|
536
|
+
diagnostics: Array<Diagnostic>;
|
|
537
|
+
}] | ["run:start", {
|
|
538
|
+
result: Result;
|
|
539
|
+
}] | ["run:end", {
|
|
540
|
+
result: Result;
|
|
541
|
+
}] | ["store:info", {
|
|
542
|
+
compilerVersion: string;
|
|
543
|
+
installationPath: string;
|
|
544
|
+
}] | ["store:error", {
|
|
545
|
+
diagnostics: Array<Diagnostic>;
|
|
546
|
+
}] | ["target:start", {
|
|
547
|
+
result: TargetResult;
|
|
548
|
+
}] | ["target:end", {
|
|
549
|
+
result: TargetResult;
|
|
550
|
+
}] | ["project:info", {
|
|
551
|
+
compilerVersion: string;
|
|
552
|
+
projectConfigFilePath: string | undefined;
|
|
553
|
+
}] | ["project:error", {
|
|
554
|
+
diagnostics: Array<Diagnostic>;
|
|
555
|
+
}] | ["file:start", {
|
|
556
|
+
result: FileResult;
|
|
557
|
+
}] | ["file:error", {
|
|
558
|
+
diagnostics: Array<Diagnostic>;
|
|
559
|
+
result: FileResult;
|
|
560
|
+
}] | ["file:end", {
|
|
561
|
+
result: FileResult;
|
|
562
|
+
}] | ["describe:start", {
|
|
563
|
+
result: DescribeResult;
|
|
564
|
+
}] | ["describe:end", {
|
|
565
|
+
result: DescribeResult;
|
|
566
|
+
}] | ["test:start", {
|
|
567
|
+
result: TestResult;
|
|
568
|
+
}] | ["test:error", {
|
|
569
|
+
diagnostics: Array<Diagnostic>;
|
|
570
|
+
result: TestResult;
|
|
571
|
+
}] | ["test:fail", {
|
|
572
|
+
result: TestResult;
|
|
573
|
+
}] | ["test:pass", {
|
|
574
|
+
result: TestResult;
|
|
575
|
+
}] | ["test:skip", {
|
|
576
|
+
result: TestResult;
|
|
577
|
+
}] | ["test:todo", {
|
|
578
|
+
result: TestResult;
|
|
579
|
+
}] | ["expect:start", {
|
|
580
|
+
result: ExpectResult;
|
|
581
|
+
}] | ["expect:error", {
|
|
582
|
+
diagnostics: Array<Diagnostic>;
|
|
583
|
+
result: ExpectResult;
|
|
584
|
+
}] | ["expect:fail", {
|
|
585
|
+
diagnostics: Array<Diagnostic>;
|
|
586
|
+
result: ExpectResult;
|
|
587
|
+
}] | ["expect:pass", {
|
|
588
|
+
result: ExpectResult;
|
|
589
|
+
}] | ["expect:skip", {
|
|
590
|
+
result: ExpectResult;
|
|
591
|
+
}] | ["watch:error", {
|
|
592
|
+
diagnostics: Array<Diagnostic>;
|
|
593
|
+
}];
|
|
594
|
+
|
|
595
|
+
interface EventHandler {
|
|
596
|
+
handleEvent: (event: Event) => void;
|
|
597
|
+
}
|
|
598
|
+
declare class EventEmitter {
|
|
599
|
+
#private;
|
|
600
|
+
addHandler(handler: EventHandler): void;
|
|
601
|
+
static dispatch(event: Event): void;
|
|
602
|
+
removeHandler(handler: EventHandler): void;
|
|
603
|
+
removeHandlers(): void;
|
|
604
|
+
}
|
|
605
|
+
|
|
607
606
|
interface MatchResult {
|
|
608
607
|
explain: () => Array<Diagnostic>;
|
|
609
608
|
isMatch: boolean;
|
|
@@ -715,34 +714,40 @@ declare class ExitCodeHandler implements EventHandler {
|
|
|
715
714
|
resetCode(): void;
|
|
716
715
|
}
|
|
717
716
|
|
|
718
|
-
declare class
|
|
717
|
+
declare class ResultHandler implements EventHandler {
|
|
719
718
|
#private;
|
|
720
|
-
constructor(resolvedConfig: ResolvedConfig, outputService: OutputService);
|
|
721
719
|
handleEvent([eventName, payload]: Event): void;
|
|
722
720
|
}
|
|
723
721
|
|
|
724
|
-
declare class
|
|
725
|
-
|
|
722
|
+
declare abstract class Reporter implements EventHandler {
|
|
723
|
+
protected outputService: OutputService;
|
|
726
724
|
constructor(outputService: OutputService);
|
|
727
|
-
handleEvent([eventName, payload]: Event): void;
|
|
725
|
+
abstract handleEvent([eventName, payload]: Event): void;
|
|
728
726
|
}
|
|
729
727
|
|
|
730
|
-
declare class
|
|
728
|
+
declare class RunReporter extends Reporter implements EventHandler {
|
|
731
729
|
#private;
|
|
732
|
-
constructor(outputService: OutputService);
|
|
730
|
+
constructor(resolvedConfig: ResolvedConfig, outputService: OutputService);
|
|
733
731
|
handleEvent([eventName, payload]: Event): void;
|
|
734
732
|
}
|
|
735
733
|
|
|
736
|
-
declare class
|
|
737
|
-
|
|
738
|
-
|
|
734
|
+
declare class SetupReporter extends Reporter implements EventHandler {
|
|
735
|
+
handleEvent([eventName, payload]: Event): void;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
declare class SummaryReporter extends Reporter implements EventHandler {
|
|
739
|
+
handleEvent([eventName, payload]: Event): void;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
declare class WatchReporter extends Reporter implements EventHandler {
|
|
739
743
|
handleEvent([eventName, payload]: Event): void;
|
|
740
744
|
}
|
|
741
745
|
|
|
742
|
-
type InputHandler = (chunk:
|
|
746
|
+
type InputHandler = (chunk: string) => void;
|
|
743
747
|
interface ReadStream {
|
|
744
748
|
addListener: (event: "data", handler: InputHandler) => this;
|
|
745
749
|
removeListener: (event: "data", handler: InputHandler) => this;
|
|
750
|
+
setEncoding: (encoding: "utf8") => this;
|
|
746
751
|
setRawMode?: (mode: boolean) => this;
|
|
747
752
|
unref: () => this;
|
|
748
753
|
}
|
|
@@ -810,4 +815,4 @@ declare class WatchService {
|
|
|
810
815
|
watch(cancellationToken?: CancellationToken): Promise<Array<void>>;
|
|
811
816
|
}
|
|
812
817
|
|
|
813
|
-
export { Assertion, CancellationHandler, CancellationReason, CancellationToken, Cli, CollectService, Color, type CommandLineOptions, type ConfigFileOptions, ConfigService, DescribeResult, Diagnostic, DiagnosticCategory, DiagnosticOrigin, Environment, type Event, EventEmitter, type EventHandler, ExitCodeHandler, Expect, ExpectResult, FileResult, type FileResultStatus, type FileWatchHandler, FileWatcher, type InputHandler, InputService, type InputServiceOptions, type ItemDefinition, Line, type MatchResult, OptionBrand, type OptionDefinition, OptionDefinitionsMap,
|
|
818
|
+
export { Assertion, CancellationHandler, CancellationReason, CancellationToken, Cli, CollectService, Color, type CommandLineOptions, ConfigDiagnosticText, type ConfigFileOptions, ConfigService, DescribeResult, Diagnostic, DiagnosticCategory, DiagnosticOrigin, Environment, type Event, EventEmitter, type EventHandler, ExitCodeHandler, Expect, ExpectResult, FileResult, type FileResultStatus, type FileWatchHandler, FileWatcher, type InputHandler, InputService, type InputServiceOptions, type ItemDefinition, Line, type MatchResult, OptionBrand, type OptionDefinition, OptionDefinitionsMap, OptionGroup, OutputService, type OutputServiceOptions, Path, ProjectResult, ProjectService, type ReadStream, type ResolvedConfig, Result, ResultCount, ResultHandler, ResultStatus, ResultTiming, type RunCallback, RunReporter, Scribbler, ScribblerJsx, type ScribblerOptions, SelectDiagnosticText, SelectService, SetupReporter, StoreService, SummaryReporter, TSTyche, TargetResult, type TargetResultStatus, TaskRunner, TestFile, TestMember, TestMemberBrand, TestMemberFlags, TestResult, TestTree, Text, type TypeChecker, Version, type WatchHandler, WatchReporter, WatchService, Watcher, type WatcherOptions, type WriteStream, addsPackageStepText, defaultOptions, describeNameText, diagnosticText, fileStatusText, fileViewText, formattedText, helpText, summaryText, testNameText, usesCompilerStepText, waitingForFileChangesText, watchUsageText };
|