testeranto.tiposkripto 0.2.21 → 0.3.1
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 +13 -0
- package/dist/module/Node.js +191 -228
- package/dist/module/Web.js +282 -232
- package/dist/module/index.js +467 -349
- package/dist/types/lib/tiposkripto/src/BaseAction.d.ts +2 -2
- package/dist/types/lib/tiposkripto/src/BaseCheck.d.ts +2 -2
- package/dist/types/lib/tiposkripto/src/BaseDescribe.d.ts +26 -0
- package/dist/types/lib/tiposkripto/src/BaseExpected.d.ts +25 -0
- package/dist/types/lib/tiposkripto/src/BaseGiven.d.ts +11 -2
- package/dist/types/lib/tiposkripto/src/BaseIt.d.ts +23 -0
- package/dist/types/lib/tiposkripto/src/BaseSetup.d.ts +2 -2
- package/dist/types/lib/tiposkripto/src/BaseShould.d.ts +25 -0
- package/dist/types/lib/tiposkripto/src/BaseThen.d.ts +10 -2
- package/dist/types/lib/tiposkripto/src/BaseTiposkripto.d.ts +8 -6
- package/dist/types/lib/tiposkripto/src/BaseValue.d.ts +27 -0
- package/dist/types/lib/tiposkripto/src/BaseWhen.d.ts +10 -2
- package/dist/types/lib/tiposkripto/src/Web.d.ts +13 -2
- package/dist/types/lib/tiposkripto/src/index.d.ts +44 -57
- package/dist/types/lib/tiposkripto/src/types.d.ts +5 -6
- package/dist/types/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { TestTypeParams_any } from "./CoreTypes.js";
|
|
2
2
|
/**
|
|
3
|
-
* BaseAction is the unified base class for all action phases.
|
|
3
|
+
* BaseAction is the internal unified base class for all action phases.
|
|
4
4
|
* It covers BDD's When, AAA's Act, and TDT's Feed.
|
|
5
|
-
*
|
|
5
|
+
* This class is not exposed to users - use BaseWhen, BaseShould, or BaseIt instead.
|
|
6
6
|
*/
|
|
7
7
|
export declare abstract class BaseAction<I extends TestTypeParams_any> {
|
|
8
8
|
name: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { TestTypeParams_any } from "./CoreTypes.js";
|
|
2
2
|
import type { ITestResourceConfiguration } from "./types.js";
|
|
3
3
|
/**
|
|
4
|
-
* BaseCheck is the unified base class for all verification phases.
|
|
4
|
+
* BaseCheck is the internal unified base class for all verification phases.
|
|
5
5
|
* It covers BDD's Then, AAA's Assert, and TDT's Validate.
|
|
6
|
-
*
|
|
6
|
+
* This class is not exposed to users - use BaseThen, BaseExpected, or BaseAssert instead.
|
|
7
7
|
*/
|
|
8
8
|
export declare abstract class BaseCheck<I extends TestTypeParams_any> {
|
|
9
9
|
name: string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BaseSetup } from "./BaseSetup.js";
|
|
2
|
+
import type { TestTypeParams_any } from "./CoreTypes.js";
|
|
3
|
+
import type { ITestArtifactory, ITestResourceConfiguration } from "./types.js";
|
|
4
|
+
/**
|
|
5
|
+
* BaseDescribe extends BaseSetup for Describe-It pattern (AAA).
|
|
6
|
+
* Describe can be nested, and Its can mix mutations and assertions.
|
|
7
|
+
*/
|
|
8
|
+
export declare class BaseDescribe<I extends TestTypeParams_any> extends BaseSetup<I> {
|
|
9
|
+
/**
|
|
10
|
+
* Abstract method to be implemented by concrete Describe classes.
|
|
11
|
+
* Sets up the initial state for the Describe-It pattern (AAA Arrange phase).
|
|
12
|
+
*
|
|
13
|
+
* @param subject The test subject
|
|
14
|
+
* @param testResourceConfiguration Test resource configuration
|
|
15
|
+
* @param artifactory Context-aware artifactory for file operations
|
|
16
|
+
* @param setupCB Setup callback function
|
|
17
|
+
* @param initialValues Initial values for setup
|
|
18
|
+
* @returns Promise resolving to the test store
|
|
19
|
+
*/
|
|
20
|
+
abstract setupThat(subject: I["isubject"], testResourceConfiguration: ITestResourceConfiguration, artifactory: ITestArtifactory, setupCB: I["given"], initialValues: any): Promise<I["istore"]>;
|
|
21
|
+
its: any[];
|
|
22
|
+
constructor(features: string[], its: any[], describeCB: I["given"], initialValues: any);
|
|
23
|
+
setup(subject: I["isubject"], key: string, testResourceConfiguration: ITestResourceConfiguration, tester: (t: Awaited<I["then"]> | undefined) => boolean, artifactory?: ITestArtifactory, suiteNdx?: number): Promise<I["istore"]>;
|
|
24
|
+
private createArtifactoryForIt;
|
|
25
|
+
}
|
|
26
|
+
export type IDescribes<I extends TestTypeParams_any> = Record<string, BaseDescribe<I>>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BaseCheck } from "./BaseCheck.js";
|
|
2
|
+
import type { TestTypeParams_any } from "./CoreTypes.js";
|
|
3
|
+
import type { ITestResourceConfiguration } from "./types.js";
|
|
4
|
+
/**
|
|
5
|
+
* BaseExpected extends BaseCheck for TDT pattern.
|
|
6
|
+
* Validates each row in table-driven testing.
|
|
7
|
+
*/
|
|
8
|
+
export declare class BaseExpected<I extends TestTypeParams_any> extends BaseCheck<I> {
|
|
9
|
+
/**
|
|
10
|
+
* Abstract method to be implemented by concrete Expected classes.
|
|
11
|
+
* Validates each row in table-driven testing (TDT pattern).
|
|
12
|
+
*
|
|
13
|
+
* @param store The test store
|
|
14
|
+
* @param checkCB Check callback function
|
|
15
|
+
* @param testResourceConfiguration Test resource configuration
|
|
16
|
+
* @param artifactory Context-aware artifactory for file operations
|
|
17
|
+
* @returns Promise resolving to the selection for verification
|
|
18
|
+
*/
|
|
19
|
+
abstract verifyCheck(store: I["istore"], checkCB: (s: I["iselection"]) => Promise<I["isubject"]>, testResourceConfiguration: ITestResourceConfiguration, artifactory?: any): Promise<I["iselection"]>;
|
|
20
|
+
expectedValue: any;
|
|
21
|
+
constructor(name: string, expectedCB: (val: I["iselection"]) => Promise<I["then"]>);
|
|
22
|
+
setExpectedValue(expected: any): void;
|
|
23
|
+
validateRow(store: I["istore"], testResourceConfiguration: any, filepath: string, expectedValue: any, artifactory?: any): Promise<I["then"] | undefined>;
|
|
24
|
+
}
|
|
25
|
+
export type IExpecteds<I extends TestTypeParams_any> = Record<string, BaseExpected<I>>;
|
|
@@ -8,12 +8,10 @@ import { BaseSetup } from "./BaseSetup.js";
|
|
|
8
8
|
* - Tests often need to reference specific Given conditions by name
|
|
9
9
|
* - This allows for better organization and reuse of setup logic
|
|
10
10
|
* - The BDD pattern often involves multiple named Given scenarios
|
|
11
|
-
* @deprecated Use BaseSetup for unified terminology
|
|
12
11
|
*/
|
|
13
12
|
export type IGivens<I extends TestTypeParams_any> = Record<string, BaseGiven<I>>;
|
|
14
13
|
/**
|
|
15
14
|
* BaseGiven extends BaseSetup for BDD pattern.
|
|
16
|
-
* @deprecated Use BaseSetup for unified terminology
|
|
17
15
|
*/
|
|
18
16
|
export declare abstract class BaseGiven<I extends TestTypeParams_any> extends BaseSetup<I> {
|
|
19
17
|
features: string[];
|
|
@@ -44,6 +42,17 @@ export declare abstract class BaseGiven<I extends TestTypeParams_any> extends Ba
|
|
|
44
42
|
artifacts: string[];
|
|
45
43
|
status: boolean | undefined;
|
|
46
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* Abstract method to be implemented by concrete Given classes.
|
|
47
|
+
* Sets up the initial state for the BDD Given phase.
|
|
48
|
+
*
|
|
49
|
+
* @param subject The test subject
|
|
50
|
+
* @param testResourceConfiguration Test resource configuration
|
|
51
|
+
* @param artifactory Context-aware artifactory for file operations
|
|
52
|
+
* @param givenCB Given callback function
|
|
53
|
+
* @param initialValues Initial values for setup
|
|
54
|
+
* @returns Promise resolving to the test store
|
|
55
|
+
*/
|
|
47
56
|
abstract givenThat(subject: I["isubject"], testResourceConfiguration: ITestResourceConfiguration, artifactory: ITestArtifactory, givenCB: I["given"], initialValues: any): Promise<I["istore"]>;
|
|
48
57
|
setupThat(subject: I["isubject"], testResourceConfiguration: ITestResourceConfiguration, artifactory: ITestArtifactory, setupCB: I["given"], initialValues: any): Promise<I["istore"]>;
|
|
49
58
|
afterEach(store: I["istore"], key: string, artifactory: ITestArtifactory): Promise<I["istore"]>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BaseAction } from "./BaseAction.js";
|
|
2
|
+
import type { TestTypeParams_any } from "./CoreTypes.js";
|
|
3
|
+
/**
|
|
4
|
+
* BaseIt extends BaseAction for Describe-It pattern.
|
|
5
|
+
* Its can mix mutations and assertions, unlike BDD's When which only does mutations.
|
|
6
|
+
*/
|
|
7
|
+
export declare class BaseIt<I extends TestTypeParams_any> extends BaseAction<I> {
|
|
8
|
+
/**
|
|
9
|
+
* Abstract method to be implemented by concrete It classes.
|
|
10
|
+
* Performs the action for the Describe-It pattern (AAA Act/Assert combined phase).
|
|
11
|
+
*
|
|
12
|
+
* @param store The test store
|
|
13
|
+
* @param actionCB Action callback function
|
|
14
|
+
* @param testResource Test resource configuration
|
|
15
|
+
* @param artifactory Context-aware artifactory for file operations
|
|
16
|
+
* @returns Promise resolving to the result of the action
|
|
17
|
+
*/
|
|
18
|
+
abstract performAction(store: I["istore"], actionCB: (x: I["iselection"]) => I["then"], testResource: any, artifactory?: any): Promise<any>;
|
|
19
|
+
constructor(name: string, itCB: (xyz: I["iselection"]) => I["then"]);
|
|
20
|
+
test(store: I["istore"], testResourceConfiguration: any, artifactory?: any): Promise<any>;
|
|
21
|
+
performIt(store: I["istore"], itCB: (x: I["iselection"]) => I["then"], testResource: any, artifactory?: any): Promise<any>;
|
|
22
|
+
}
|
|
23
|
+
export type IIts<I extends TestTypeParams_any> = Record<string, BaseIt<I>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { TestTypeParams_any } from "./CoreTypes.js";
|
|
2
2
|
import type { ITestArtifactory, ITestResourceConfiguration } from "./types.js";
|
|
3
3
|
/**
|
|
4
|
-
* BaseSetup is the unified base class for all setup phases.
|
|
4
|
+
* BaseSetup is the internal unified base class for all setup phases.
|
|
5
5
|
* It covers BDD's Given, AAA's Arrange, and TDT's Map.
|
|
6
|
-
*
|
|
6
|
+
* This class is not exposed to users - use BaseGiven, BaseValue, or BaseDescribe instead.
|
|
7
7
|
*/
|
|
8
8
|
export declare abstract class BaseSetup<I extends TestTypeParams_any> {
|
|
9
9
|
features: string[];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BaseAction } from "./BaseAction.js";
|
|
2
|
+
import type { TestTypeParams_any } from "./CoreTypes.js";
|
|
3
|
+
/**
|
|
4
|
+
* BaseShould extends BaseAction for TDT pattern.
|
|
5
|
+
* Processes each row in table-driven testing.
|
|
6
|
+
*/
|
|
7
|
+
export declare class BaseShould<I extends TestTypeParams_any> extends BaseAction<I> {
|
|
8
|
+
/**
|
|
9
|
+
* Abstract method to be implemented by concrete Should classes.
|
|
10
|
+
* Processes each row in table-driven testing (TDT pattern).
|
|
11
|
+
*
|
|
12
|
+
* @param store The test store
|
|
13
|
+
* @param actionCB Action callback function
|
|
14
|
+
* @param testResource Test resource configuration
|
|
15
|
+
* @param artifactory Context-aware artifactory for file operations
|
|
16
|
+
* @returns Promise resolving to the result of the action
|
|
17
|
+
*/
|
|
18
|
+
abstract performAction(store: I["istore"], actionCB: (x: I["iselection"]) => I["then"], testResource: any, artifactory?: any): Promise<any>;
|
|
19
|
+
currentRow: any[];
|
|
20
|
+
rowIndex: number;
|
|
21
|
+
constructor(name: string, shouldCB: (xyz: I["iselection"]) => I["then"]);
|
|
22
|
+
setRowData(rowIndex: number, rowData: any[]): void;
|
|
23
|
+
processRow(store: I["istore"], testResourceConfiguration: any, artifactory?: any): Promise<any>;
|
|
24
|
+
}
|
|
25
|
+
export type IShoulds<I extends TestTypeParams_any> = Record<string, BaseShould<I>>;
|
|
@@ -3,11 +3,20 @@ import type { ITestResourceConfiguration } from "./types.js";
|
|
|
3
3
|
import { BaseCheck } from "./BaseCheck.js";
|
|
4
4
|
/**
|
|
5
5
|
* BaseThen extends BaseCheck for BDD pattern.
|
|
6
|
-
* @deprecated Use BaseCheck for unified terminology
|
|
7
6
|
*/
|
|
8
7
|
export declare abstract class BaseThen<I extends TestTypeParams_any> extends BaseCheck<I> {
|
|
9
8
|
thenCB: (storeState: I["iselection"]) => Promise<I["then"]>;
|
|
10
9
|
constructor(name: string, thenCB: (val: I["iselection"]) => Promise<I["then"]>);
|
|
10
|
+
/**
|
|
11
|
+
* Abstract method to be implemented by concrete Then classes.
|
|
12
|
+
* Performs the verification for the BDD Then phase.
|
|
13
|
+
*
|
|
14
|
+
* @param store The test store
|
|
15
|
+
* @param thenCB Then callback function
|
|
16
|
+
* @param testResourceConfiguration Test resource configuration
|
|
17
|
+
* @param artifactory Context-aware artifactory for file operations
|
|
18
|
+
* @returns Promise resolving to the selection for verification
|
|
19
|
+
*/
|
|
11
20
|
abstract butThen(store: I["istore"], thenCB: (s: I["iselection"]) => Promise<I["isubject"]>, testResourceConfiguration: ITestResourceConfiguration, artifactory?: any): Promise<I["iselection"]>;
|
|
12
21
|
test(store: I["istore"], testResourceConfiguration: ITestResourceConfiguration, filepath: string, artifactory?: any): Promise<I["then"] | undefined>;
|
|
13
22
|
}
|
|
@@ -18,6 +27,5 @@ export declare abstract class BaseThen<I extends TestTypeParams_any> extends Bas
|
|
|
18
27
|
* - Assertions might need to be reused or composed dynamically
|
|
19
28
|
* - Custom assertion libraries could benefit from named assertion collections
|
|
20
29
|
* - Advanced validation patterns require named Then conditions
|
|
21
|
-
* @deprecated Use IChecks for unified terminology
|
|
22
30
|
*/
|
|
23
31
|
export type IThens<I extends TestTypeParams_any> = Record<string, BaseThen<I>>;
|
|
@@ -25,15 +25,17 @@ export default abstract class BaseTiposkripto<I extends Ibdd_in_any = Ibdd_in_an
|
|
|
25
25
|
suiteIndex?: number;
|
|
26
26
|
}): {
|
|
27
27
|
writeFileSync: (filename: string, payload: string) => void;
|
|
28
|
-
screenshot: (filename: string, payload?: string) => void;
|
|
29
|
-
openScreencast: (filename: string) => Promise<void>;
|
|
30
|
-
closeScreencast: (filename: string) => Promise<void>;
|
|
31
28
|
};
|
|
32
29
|
constructor(webOrNode: "web" | "node", input: I["iinput"], testSpecification: ITestSpecification<I, O>, testImplementation: ITestImplementation<I, O, M> & {
|
|
33
30
|
suites: Record<string, object>;
|
|
34
|
-
givens
|
|
35
|
-
whens
|
|
36
|
-
thens
|
|
31
|
+
givens?: Record<string, any>;
|
|
32
|
+
whens?: Record<string, any>;
|
|
33
|
+
thens?: Record<string, any>;
|
|
34
|
+
values?: Record<string, any>;
|
|
35
|
+
shoulds?: Record<string, any>;
|
|
36
|
+
expecteds?: Record<string, any>;
|
|
37
|
+
describes?: Record<string, any>;
|
|
38
|
+
its?: Record<string, any>;
|
|
37
39
|
}, testResourceRequirement: ITTestResourceRequest | undefined, testAdapter: Partial<ITestAdapter<I>> | undefined, testResourceConfiguration: ITestResourceConfiguration, wsPort?: string, wsHost?: string);
|
|
38
40
|
receiveTestResourceConfig(testResourceConfig: ITestResourceConfiguration): Promise<any>;
|
|
39
41
|
Specs(): any;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BaseSetup } from "./BaseSetup.js";
|
|
2
|
+
import type { TestTypeParams_any } from "./CoreTypes.js";
|
|
3
|
+
import type { ITestArtifactory, ITestResourceConfiguration } from "./types.js";
|
|
4
|
+
/**
|
|
5
|
+
* BaseValue extends BaseSetup for TDT pattern.
|
|
6
|
+
* Sets up table data for table-driven testing.
|
|
7
|
+
*/
|
|
8
|
+
export declare class BaseValue<I extends TestTypeParams_any> extends BaseSetup<I> {
|
|
9
|
+
/**
|
|
10
|
+
* Abstract method to be implemented by concrete Value classes.
|
|
11
|
+
* Sets up table data for the TDT (Table-Driven Testing) pattern.
|
|
12
|
+
*
|
|
13
|
+
* @param subject The test subject
|
|
14
|
+
* @param testResourceConfiguration Test resource configuration
|
|
15
|
+
* @param artifactory Context-aware artifactory for file operations
|
|
16
|
+
* @param setupCB Setup callback function
|
|
17
|
+
* @param initialValues Initial values for setup
|
|
18
|
+
* @returns Promise resolving to the test store
|
|
19
|
+
*/
|
|
20
|
+
abstract setupThat(subject: I["isubject"], testResourceConfiguration: ITestResourceConfiguration, artifactory: ITestArtifactory, setupCB: I["given"], initialValues: any): Promise<I["istore"]>;
|
|
21
|
+
tableRows: any[][];
|
|
22
|
+
constructor(features: string[], tableRows: any[][], confirmCB: I["given"], initialValues: any);
|
|
23
|
+
setup(subject: I["isubject"], key: string, testResourceConfiguration: ITestResourceConfiguration, tester: (t: Awaited<I["then"]> | undefined) => boolean, artifactory?: ITestArtifactory, suiteNdx?: number): Promise<I["istore"]>;
|
|
24
|
+
private processRow;
|
|
25
|
+
private createArtifactoryForRow;
|
|
26
|
+
}
|
|
27
|
+
export type IValues<I extends TestTypeParams_any> = Record<string, BaseValue<I>>;
|
|
@@ -2,11 +2,20 @@ import type { TestTypeParams_any } from "./CoreTypes.js";
|
|
|
2
2
|
import { BaseAction } from "./BaseAction.js";
|
|
3
3
|
/**
|
|
4
4
|
* BaseWhen extends BaseAction for BDD pattern.
|
|
5
|
-
* @deprecated Use BaseAction for unified terminology
|
|
6
5
|
*/
|
|
7
6
|
export declare abstract class BaseWhen<I extends TestTypeParams_any> extends BaseAction<I> {
|
|
8
7
|
whenCB: (x: I["iselection"]) => I["then"];
|
|
9
8
|
constructor(name: string, whenCB: (xyz: I["iselection"]) => I["then"]);
|
|
9
|
+
/**
|
|
10
|
+
* Abstract method to be implemented by concrete When classes.
|
|
11
|
+
* Performs the action for the BDD When phase.
|
|
12
|
+
*
|
|
13
|
+
* @param store The test store
|
|
14
|
+
* @param whenCB When callback function
|
|
15
|
+
* @param testResource Test resource configuration
|
|
16
|
+
* @param artifactory Context-aware artifactory for file operations
|
|
17
|
+
* @returns Promise resolving to the result of the action
|
|
18
|
+
*/
|
|
10
19
|
abstract andWhen(store: I["istore"], whenCB: (x: I["iselection"]) => I["then"], testResource: any, artifactory?: any): Promise<any>;
|
|
11
20
|
performAction(store: I["istore"], actionCB: (x: I["iselection"]) => I["then"], testResource: any): Promise<any>;
|
|
12
21
|
test(store: I["istore"], testResourceConfiguration: any, artifactory?: any): Promise<any>;
|
|
@@ -18,6 +27,5 @@ export declare abstract class BaseWhen<I extends TestTypeParams_any> extends Bas
|
|
|
18
27
|
* - When actions might need to be reused across multiple Given conditions
|
|
19
28
|
* - Dynamic composition of test steps is required
|
|
20
29
|
* - Advanced test patterns need to reference When actions by name
|
|
21
|
-
* @deprecated Use IActions for unified terminology
|
|
22
30
|
*/
|
|
23
31
|
export type IWhens<I extends TestTypeParams_any> = Record<string, BaseWhen<I>>;
|
|
@@ -12,8 +12,19 @@ export declare class WebTiposkripto<I extends TestTypeParams_any, O extends Test
|
|
|
12
12
|
constructor(input: I["iinput"], testSpecification: ITestSpecification<I, O>, testImplementation: ITestImplementation<I, O, M>, testResourceRequirement: ITTestResourceRequest, testAdapter: Partial<ITestAdapter<I>>);
|
|
13
13
|
writeFileSync(filename: string, payload: string): void;
|
|
14
14
|
screenshot(filename: string, payload?: string): void;
|
|
15
|
-
openScreencast(filename: string): void
|
|
16
|
-
closeScreencast(filename: string): void
|
|
15
|
+
openScreencast(filename: string): Promise<void>;
|
|
16
|
+
closeScreencast(filename: string): Promise<void>;
|
|
17
|
+
createArtifactory(context?: {
|
|
18
|
+
givenKey?: string;
|
|
19
|
+
whenIndex?: number;
|
|
20
|
+
thenIndex?: number;
|
|
21
|
+
suiteIndex?: number;
|
|
22
|
+
}): {
|
|
23
|
+
screenshot: (filename: string, payload?: string) => void;
|
|
24
|
+
openScreencast: (filename: string) => Promise<void>;
|
|
25
|
+
closeScreencast: (filename: string) => Promise<void>;
|
|
26
|
+
writeFileSync: (filename: string, payload: string) => void;
|
|
27
|
+
};
|
|
17
28
|
}
|
|
18
29
|
declare const tiposkripto: <I extends TestTypeParams_any, O extends TestSpecShape_any, M>(input: I["iinput"], testSpecification: ITestSpecification<I, O>, testImplementation: ITestImplementation<I, O, M>, testAdapter: Partial<ITestAdapter<I>>, testResourceRequirement?: ITTestResourceRequest) => Promise<BaseTiposkripto<I, O, M>>;
|
|
19
30
|
export default tiposkripto;
|
|
@@ -1,102 +1,89 @@
|
|
|
1
1
|
import type { Ibdd_in_any, Ibdd_out_any, IUniversalTestAdapter, ITestAdapter, TestTypeParams_any } from "./CoreTypes";
|
|
2
2
|
export declare const BaseAdapter: <T extends TestTypeParams_any>() => IUniversalTestAdapter<T>;
|
|
3
3
|
export declare const DefaultAdapter: <T extends TestTypeParams_any>(p: Partial<ITestAdapter<T>>) => IUniversalTestAdapter<T>;
|
|
4
|
-
export { BaseSetup } from "./BaseSetup.js";
|
|
5
|
-
export { BaseAction } from "./BaseAction.js";
|
|
6
|
-
export { BaseCheck } from "./BaseCheck.js";
|
|
7
|
-
export { BaseArrange } from "./BaseArrange.js";
|
|
8
|
-
export { BaseAct } from "./BaseAct.js";
|
|
9
|
-
export { BaseAssert } from "./BaseAssert.js";
|
|
10
|
-
export { BaseMap } from "./BaseMap.js";
|
|
11
|
-
export { BaseFeed } from "./BaseFeed.js";
|
|
12
|
-
export { BaseValidate } from "./BaseValidate.js";
|
|
13
4
|
export { BaseGiven } from "./BaseGiven.js";
|
|
14
5
|
export { BaseWhen } from "./BaseWhen.js";
|
|
15
6
|
export { BaseThen } from "./BaseThen.js";
|
|
16
|
-
export
|
|
7
|
+
export { BaseValue } from "./BaseValue.js";
|
|
8
|
+
export { BaseShould } from "./BaseShould.js";
|
|
9
|
+
export { BaseExpected } from "./BaseExpected.js";
|
|
10
|
+
export { BaseDescribe } from "./BaseDescribe.js";
|
|
11
|
+
export { BaseIt } from "./BaseIt.js";
|
|
12
|
+
export { BaseSetup } from "./BaseSetup.js";
|
|
13
|
+
export { BaseAction } from "./BaseAction.js";
|
|
14
|
+
export { BaseCheck } from "./BaseCheck.js";
|
|
15
|
+
export declare function createDescribeItSpecification<I extends Ibdd_in_any, O extends Ibdd_out_any>(): {
|
|
17
16
|
Suite: {
|
|
18
|
-
Default: (Suite: any,
|
|
19
|
-
};
|
|
20
|
-
Arrange: {
|
|
21
|
-
Default: (features: string[], acts: any[], asserts: any[], arrangeCB: I["given"], initialValues: any) => (Arrange: any) => any;
|
|
17
|
+
Default: (Suite: any, Describe: any, It: any) => (name: string, descriptions: Record<string, any>) => any;
|
|
22
18
|
};
|
|
23
|
-
|
|
24
|
-
Default: (
|
|
19
|
+
Describe: {
|
|
20
|
+
Default: (features: string[], its: any[], describeCB: I["given"], initialValues: any) => (Describe: any) => any;
|
|
25
21
|
};
|
|
26
|
-
|
|
27
|
-
Default: (name: string,
|
|
22
|
+
It: {
|
|
23
|
+
Default: (name: string, itCB: (x: I["iselection"]) => I["then"]) => (It: any) => any;
|
|
28
24
|
};
|
|
29
25
|
};
|
|
30
26
|
export declare function createTDTSpecification<I extends Ibdd_in_any, O extends Ibdd_out_any>(): {
|
|
31
27
|
Suite: {
|
|
32
|
-
Default: (Suite: any,
|
|
28
|
+
Default: (Suite: any, Value: any, Should: any, Expected: any) => (name: string, confirms: Record<string, any>) => any;
|
|
33
29
|
};
|
|
34
|
-
|
|
35
|
-
Default: (features: string[],
|
|
30
|
+
Value: {
|
|
31
|
+
Default: (features: string[], tableRows: any[][], confirmCB: I["given"], initialValues: any) => (Value: any) => any;
|
|
36
32
|
};
|
|
37
|
-
|
|
38
|
-
Default: (name: string,
|
|
33
|
+
Should: {
|
|
34
|
+
Default: (name: string, shouldCB: (x: I["iselection"]) => I["then"]) => (Should: any) => any;
|
|
39
35
|
};
|
|
40
|
-
|
|
41
|
-
Default: (name: string,
|
|
36
|
+
Expected: {
|
|
37
|
+
Default: (name: string, expectedCB: (val: I["iselection"]) => Promise<I["then"]>) => (Expected: any) => any;
|
|
42
38
|
};
|
|
43
39
|
};
|
|
44
|
-
export declare function
|
|
40
|
+
export declare function DescribeIt<I extends Ibdd_in_any, O extends Ibdd_out_any>(): {
|
|
45
41
|
Suite: {
|
|
46
|
-
Default: (name: string,
|
|
42
|
+
Default: (name: string, descriptions: Record<string, any>) => {
|
|
47
43
|
name: string;
|
|
48
|
-
|
|
44
|
+
descriptions: Record<string, any>;
|
|
49
45
|
};
|
|
50
46
|
};
|
|
51
|
-
|
|
52
|
-
Default: (features: string[],
|
|
47
|
+
Describe: {
|
|
48
|
+
Default: (features: string[], its: any[], describeCB: I["given"], initialValues: any) => {
|
|
53
49
|
features: string[];
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
arrangeCB: I["given"];
|
|
50
|
+
its: any[];
|
|
51
|
+
describeCB: I["given"];
|
|
57
52
|
initialValues: any;
|
|
58
53
|
};
|
|
59
54
|
};
|
|
60
|
-
|
|
61
|
-
Default: (name: string,
|
|
62
|
-
name: string;
|
|
63
|
-
actCB: (x: I["iselection"]) => I["then"];
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
Assert: {
|
|
67
|
-
Default: (name: string, assertCB: (val: I["iselection"]) => Promise<I["then"]>) => {
|
|
55
|
+
It: {
|
|
56
|
+
Default: (name: string, itCB: (x: I["iselection"]) => I["then"]) => {
|
|
68
57
|
name: string;
|
|
69
|
-
|
|
58
|
+
itCB: (x: I["iselection"]) => I["then"];
|
|
70
59
|
};
|
|
71
60
|
};
|
|
72
61
|
};
|
|
73
|
-
export declare function
|
|
62
|
+
export declare function Confirm<I extends Ibdd_in_any, O extends Ibdd_out_any>(): {
|
|
74
63
|
Suite: {
|
|
75
|
-
Default: (name: string,
|
|
64
|
+
Default: (name: string, confirms: Record<string, any>) => {
|
|
76
65
|
name: string;
|
|
77
|
-
|
|
66
|
+
confirms: Record<string, any>;
|
|
78
67
|
};
|
|
79
68
|
};
|
|
80
|
-
|
|
81
|
-
Default: (features: string[],
|
|
69
|
+
Value: {
|
|
70
|
+
Default: (features: string[], tableRows: any[][], confirmCB: I["given"], initialValues: any) => {
|
|
82
71
|
features: string[];
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
mapCB: I["given"];
|
|
72
|
+
tableRows: any[][];
|
|
73
|
+
confirmCB: I["given"];
|
|
86
74
|
initialValues: any;
|
|
87
|
-
tableData: any[];
|
|
88
75
|
};
|
|
89
76
|
};
|
|
90
|
-
|
|
91
|
-
Default: (name: string,
|
|
77
|
+
Should: {
|
|
78
|
+
Default: (name: string, shouldCB: (x: I["iselection"]) => I["then"]) => {
|
|
92
79
|
name: string;
|
|
93
|
-
|
|
80
|
+
shouldCB: (x: I["iselection"]) => I["then"];
|
|
94
81
|
};
|
|
95
82
|
};
|
|
96
|
-
|
|
97
|
-
Default: (name: string,
|
|
83
|
+
Expected: {
|
|
84
|
+
Default: (name: string, expectedCB: (val: I["iselection"]) => Promise<I["then"]>) => {
|
|
98
85
|
name: string;
|
|
99
|
-
|
|
86
|
+
expectedCB: (val: I["iselection"]) => Promise<I["then"]>;
|
|
100
87
|
};
|
|
101
88
|
};
|
|
102
89
|
};
|
|
@@ -24,12 +24,11 @@ export type ITTestResourceRequirement = {
|
|
|
24
24
|
export type ISetups<I extends TestTypeParams_any> = Record<string, import("./BaseSetup").BaseSetup<I>>;
|
|
25
25
|
export type IActions<I extends TestTypeParams_any> = Record<string, import("./BaseAction").BaseAction<I>>;
|
|
26
26
|
export type IChecks<I extends TestTypeParams_any> = Record<string, import("./BaseCheck").BaseCheck<I>>;
|
|
27
|
-
export type
|
|
28
|
-
export type
|
|
29
|
-
export type
|
|
30
|
-
export type
|
|
31
|
-
export type
|
|
32
|
-
export type IValidates<I extends TestTypeParams_any> = Record<string, import("./BaseValidate").BaseValidate<I>>;
|
|
27
|
+
export type IValues<I extends TestTypeParams_any> = Record<string, import("./BaseValue").BaseValue<I>>;
|
|
28
|
+
export type IShoulds<I extends TestTypeParams_any> = Record<string, import("./BaseShould").BaseShould<I>>;
|
|
29
|
+
export type IExpecteds<I extends TestTypeParams_any> = Record<string, import("./BaseExpected").BaseExpected<I>>;
|
|
30
|
+
export type IDescribes<I extends TestTypeParams_any> = Record<string, import("./BaseDescribe").BaseDescribe<I>>;
|
|
31
|
+
export type IIts<I extends TestTypeParams_any> = Record<string, import("./BaseIt").BaseIt<I>>;
|
|
33
32
|
export type IGivens<I extends TestTypeParams_any> = Record<string, import("./BaseGiven").BaseGiven<I>>;
|
|
34
33
|
export type IWhens<I extends TestTypeParams_any> = Record<string, import("./BaseWhen").BaseWhen<I>>;
|
|
35
34
|
export type IThens<I extends TestTypeParams_any> = Record<string, import("./BaseThen").BaseThen<I>>;
|