@@ -61,29 +61,6 @@ export class BasicCaseCreator<T extends ECompilerType> {
61
61
protected tryRunTask(): void ;
62
62
}
63
63
64
- // @public (undocumented)
65
- export class BasicRunnerFactory <T extends ECompilerType > implements TRunnerFactory <T > {
66
- constructor (name : string , context : ITestContext );
67
- // (undocumented)
68
- protected context: ITestContext ;
69
- // (undocumented)
70
- create(file : string , compilerOptions : TCompilerOptions <T >, env : ITestEnv ): ITestRunner ;
71
- // (undocumented)
72
- protected createRunner(file : string , stats : () => TCompilerStatsCompilation <T >, compilerOptions : TCompilerOptions <T >, env : ITestEnv ): ITestRunner ;
73
- // (undocumented)
74
- protected createStatsGetter(): () => TCompilerStatsCompilation <T >;
75
- // (undocumented)
76
- protected getRunnerKey(file : string ): string ;
77
- // (undocumented)
78
- protected name: string ;
79
- }
80
-
81
- // @public (undocumented)
82
- export class CacheRunnerFactory <T extends ECompilerType > extends BasicRunnerFactory <T > {
83
- // (undocumented)
84
- protected createRunner(file : string , stats : TCompilerStatsCompilation <T >, compilerOptions : TCompilerOptions <T >, env : ITestEnv ): ITestRunner ;
85
- }
86
-
87
64
// @public (undocumented)
88
65
export function checkChunkModules(statsJson : any , chunkModulesMap : any , strict ? : boolean ): boolean ;
89
66
@@ -264,12 +241,6 @@ export function getSimpleProcessorRunner(src: string, dist: string, options?: {
264
241
context? : (src : string , dist : string ) => ITestContext ;
265
242
}): (name : string , processor : ITestProcessor ) => Promise <void >;
266
243
267
- // @public (undocumented)
268
- export class HotRunnerFactory <T extends ECompilerType > extends BasicRunnerFactory <T > {
269
- // (undocumented)
270
- protected createRunner(file : string , stats : TCompilerStatsCompilation <T >, compilerOptions : TCompilerOptions <T >, env : ITestEnv ): ITestRunner ;
271
- }
272
-
273
244
// @public (undocumented)
274
245
export interface IBasicCaseCreatorOptions <T extends ECompilerType > {
275
246
// (undocumented)
@@ -285,7 +256,7 @@ export interface IBasicCaseCreatorOptions<T extends ECompilerType> {
285
256
// (undocumented)
286
257
description? : (name : string , step : number ) => string ;
287
258
// (undocumented)
288
- runner? : new ( name : string , context : ITestContext ) => TRunnerFactory < ECompilerType > ;
259
+ runner? : TTestRunnerCreator ;
289
260
// (undocumented)
290
261
steps: (creatorConfig : IBasicCaseCreatorOptions <T > & {
291
262
name: string ;
@@ -500,9 +471,7 @@ export interface ITestContext {
500
471
// (undocumented)
501
472
getNames(): string [];
502
473
// (undocumented)
503
- getRunner(key : string ): ITestRunner | null ;
504
- // (undocumented)
505
- getRunnerFactory<T extends ECompilerType >(name : string ): TRunnerFactory <T > | null ;
474
+ getRunner(name : string , file : string , env : ITestEnv ): ITestRunner ;
506
475
// (undocumented)
507
476
getSource(sub ? : string ): string ;
508
477
// (undocumented)
@@ -514,8 +483,6 @@ export interface ITestContext {
514
483
// (undocumented)
515
484
hasError(name ? : string ): boolean ;
516
485
// (undocumented)
517
- setRunner(key : string , runner : ITestRunner ): void ;
518
- // (undocumented)
519
486
setValue<T >(name : string , key : string , value : T ): void ;
520
487
}
521
488
@@ -564,7 +531,7 @@ export interface ITesterConfig {
564
531
// (undocumented)
565
532
name: string ;
566
533
// (undocumented)
567
- runnerFactory ? : new ( name : string , context : ITestContext ) => TRunnerFactory < ECompilerType > ;
534
+ runnerCreator ? : TTestRunnerCreator ;
568
535
// (undocumented)
569
536
src: string ;
570
537
// (undocumented)
@@ -626,24 +593,15 @@ export interface ITestRunner {
626
593
}
627
594
628
595
// @public (undocumented)
629
- export class LazyCompilationTestPlugin {
596
+ export interface IWebRunnerOptions < T extends ECompilerType = ECompilerType . Rspack > extends INodeRunnerOptions < T > {
630
597
// (undocumented)
631
- apply( compiler : Compiler | MultiCompiler ) : void ;
598
+ dom : EDocumentType ;
632
599
}
633
600
634
601
// @public (undocumented)
635
- export class MultipleRunnerFactory <T extends ECompilerType > extends BasicRunnerFactory <T > {
636
- // (undocumented)
637
- protected createRunner(file : string , stats : () => TCompilerStatsCompilation <T >, compilerOptions : TCompilerOptions <T >, env : ITestEnv ): ITestRunner ;
638
- // (undocumented)
639
- protected getFileIndexHandler(file : string ): {
640
- getIndex: () => number [];
641
- flagIndex: () => Set <string >;
642
- };
643
- // (undocumented)
644
- protected getRunnerKey(file : string ): string ;
602
+ export class LazyCompilationTestPlugin {
645
603
// (undocumented)
646
- protected runned : Set < string > ;
604
+ apply( compiler : Compiler | MultiCompiler ) : void ;
647
605
}
648
606
649
607
// @public (undocumented)
@@ -804,9 +762,7 @@ export class TestContext implements ITestContext {
804
762
// (undocumented)
805
763
getNames(): string [];
806
764
// (undocumented)
807
- getRunner(key : string ): ITestRunner | null ;
808
- // (undocumented)
809
- getRunnerFactory<T extends ECompilerType >(name : string ): TRunnerFactory <T > | null ;
765
+ getRunner(name : string , file : string , env : ITestEnv ): ITestRunner ;
810
766
// (undocumented)
811
767
getSource(sub ? : string ): string ;
812
768
// (undocumented)
@@ -818,12 +774,8 @@ export class TestContext implements ITestContext {
818
774
// (undocumented)
819
775
hasError(name ? : string ): boolean ;
820
776
// (undocumented)
821
- protected runnerFactory: TRunnerFactory <ECompilerType > | null ;
822
- // (undocumented)
823
777
protected runners: Map <string , ITestRunner >;
824
778
// (undocumented)
825
- setRunner(key : string , runner : ITestRunner ): void ;
826
- // (undocumented)
827
779
setValue<T >(name : string , key : string , value : T ): void ;
828
780
// (undocumented)
829
781
protected store: Map <string , Record <string , unknown >>;
@@ -859,23 +811,6 @@ export type TFileCompareResult = TCompareResult & {
859
811
modules: Partial <Record <" modules" | " runtimeModules" , TModuleCompareResult []>>;
860
812
};
861
813
862
- // @public (undocumented)
863
- export type THotStepRuntimeData = {
864
- javascript: THotStepRuntimeLangData ;
865
- css: THotStepRuntimeLangData ;
866
- statusPath: string [];
867
- };
868
-
869
- // @public (undocumented)
870
- export type THotStepRuntimeLangData = {
871
- outdatedModules: string [];
872
- outdatedDependencies: Record <string , string []>;
873
- updatedModules: string [];
874
- updatedRuntime: string [];
875
- acceptedModules: string [];
876
- disposedModules: string [];
877
- };
878
-
879
814
// @public (undocumented)
880
815
export type THotUpdateContext = {
881
816
updateIndex: number ;
@@ -942,6 +877,12 @@ export type TTestContextOptions = Omit<ITesterConfig, "name" | "steps">;
942
877
// @public (undocumented)
943
878
export type TTestFilter <T extends ECompilerType > = (creatorConfig : Record <string , unknown >, testConfig : TTestConfig <T >) => boolean | string ;
944
879
880
+ // @public (undocumented)
881
+ export type TTestRunnerCreator = {
882
+ key: (context : ITestContext , name : string , file : string ) => string ;
883
+ runner: (context : ITestContext , name : string , file : string , env : ITestEnv ) => ITestRunner ;
884
+ };
885
+
945
886
// @public (undocumented)
946
887
export type TTestRunResult = Record <string , any >;
947
888
@@ -950,16 +891,6 @@ type WatchIncrementalOptions = {
950
891
ignoreNotFriendlyForIncrementalWarnings? : boolean ;
951
892
};
952
893
953
- // @public (undocumented)
954
- export class WatchRunnerFactory <T extends ECompilerType > extends BasicRunnerFactory <T > {
955
- // (undocumented)
956
- protected createRunner(file : string , stats : () => TCompilerStatsCompilation <T >, compilerOptions : TCompilerOptions <T >, env : ITestEnv ): ITestRunner ;
957
- // (undocumented)
958
- protected createStatsGetter(): () => TCompilerStatsCompilation <T >;
959
- // (undocumented)
960
- protected getRunnerKey(file : string ): string ;
961
- }
962
-
963
894
// @public (undocumented)
964
895
export class WebpackDiffConfigPlugin {
965
896
constructor (modifier ? : ((options : WebpackOptionsNormalized ) => WebpackOptionsNormalized ) | undefined );
@@ -975,6 +906,21 @@ export class WebpackModulePlaceholderPlugin {
975
906
apply(compiler : any ): void ;
976
907
}
977
908
909
+ // @public (undocumented)
910
+ export class WebRunner <T extends ECompilerType = ECompilerType .Rspack > implements ITestRunner {
911
+ constructor (_webOptions : IWebRunnerOptions <T >);
912
+ // (undocumented)
913
+ getGlobal(name : string ): unknown ;
914
+ // (undocumented)
915
+ getRequire(): TRunnerRequirer ;
916
+ // (undocumented)
917
+ protected originMethods: Partial <NodeRunner <T >>;
918
+ // (undocumented)
919
+ run(file : string ): Promise <unknown >;
920
+ // (undocumented)
921
+ protected _webOptions: IWebRunnerOptions <T >;
922
+ }
923
+
978
924
// (No @packageDocumentation comment for this package)
979
925
980
926
```
0 commit comments