@ripplo/testing 0.0.11 → 0.1.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 +136 -27
- package/dist/actions.d.ts +11 -4
- package/dist/actions.js +11 -6
- package/dist/assert.d.ts +12 -1
- package/dist/assert.js +19 -0
- package/dist/builder-c7tXey03.d.ts +80 -0
- package/dist/chunk-3IL457A7.js +60 -0
- package/dist/{chunk-7ETQVVAA.js → chunk-CD3M7H5A.js} +127 -46
- package/dist/{chunk-LEIKZ6BE.js → chunk-KNF4K4JH.js} +12 -4
- package/dist/compiler.d.ts +5 -3
- package/dist/compiler.js +1 -1
- package/dist/control.d.ts +1 -1
- package/dist/express.d.ts +3 -2
- package/dist/express.js +19 -3
- package/dist/fastify.d.ts +3 -2
- package/dist/fastify.js +17 -3
- package/dist/index.d.ts +13 -5
- package/dist/index.js +158 -44
- package/dist/lockfile.d.ts +68 -76
- package/dist/lockfile.js +33 -13
- package/dist/nextjs.d.ts +3 -2
- package/dist/nextjs.js +29 -5
- package/dist/{step-DLfkKI3V.d.ts → step-De52hTLd.d.ts} +1 -1
- package/dist/types-oYS_Yv4G.d.ts +115 -0
- package/package.json +3 -3
- package/dist/builder-1kySbit_.d.ts +0 -137
package/dist/nextjs.js
CHANGED
|
@@ -2,10 +2,12 @@ import {
|
|
|
2
2
|
batchRequestSchema,
|
|
3
3
|
buildSetCookieHeader,
|
|
4
4
|
createEngine,
|
|
5
|
+
observerRequestSchema,
|
|
5
6
|
serializeCookie,
|
|
6
7
|
teardownRequestSchema,
|
|
7
8
|
verifyWebhookSignature
|
|
8
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-CD3M7H5A.js";
|
|
10
|
+
import "./chunk-3IL457A7.js";
|
|
9
11
|
|
|
10
12
|
// src/adapters/nextjs.ts
|
|
11
13
|
function createNextHandler({ enabled, ripplo }) {
|
|
@@ -16,18 +18,40 @@ function createNextHandler({ enabled, ripplo }) {
|
|
|
16
18
|
const webhookSecret = ripplo.getConfig().webhookSecret;
|
|
17
19
|
return async function handler(req) {
|
|
18
20
|
const action = lastPathSegment(req.url);
|
|
19
|
-
if (action !== "execute-
|
|
21
|
+
if (action !== "execute-preconditions" && action !== "teardown-preconditions" && action !== "execute-observer") {
|
|
20
22
|
return jsonResponse({ error: "Not found" }, 404);
|
|
21
23
|
}
|
|
22
24
|
const verified = await verifyAndReadBody(req, webhookSecret);
|
|
23
25
|
if ("error" in verified) {
|
|
24
26
|
return verified.error;
|
|
25
27
|
}
|
|
26
|
-
return runGuarded(
|
|
27
|
-
() => action === "execute-batch" ? handleExecuteBatch({ body: verified.body, engine, req }) : handleTeardown({ body: verified.body, engine })
|
|
28
|
-
);
|
|
28
|
+
return runGuarded(() => dispatchAction({ action, body: verified.body, engine, req }));
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
+
function dispatchAction({ action, body, engine, req }) {
|
|
32
|
+
if (action === "execute-preconditions") {
|
|
33
|
+
return handleExecuteBatch({ body, engine, req });
|
|
34
|
+
}
|
|
35
|
+
if (action === "execute-observer") {
|
|
36
|
+
return handleExecuteObserver({ body, engine });
|
|
37
|
+
}
|
|
38
|
+
return handleTeardown({ body, engine });
|
|
39
|
+
}
|
|
40
|
+
async function handleExecuteObserver({
|
|
41
|
+
body,
|
|
42
|
+
engine
|
|
43
|
+
}) {
|
|
44
|
+
const json = tryParseJson(body);
|
|
45
|
+
const parsed = json == null ? null : observerRequestSchema.safeParse(json);
|
|
46
|
+
if (parsed == null || !parsed.success) {
|
|
47
|
+
return jsonResponse({ error: "Invalid request body", success: false }, 400);
|
|
48
|
+
}
|
|
49
|
+
const result = await engine.executeObserver(parsed.data.observer, parsed.data.params);
|
|
50
|
+
return jsonResponse(
|
|
51
|
+
{ error: result.error, outcome: result.outcome, success: result.success },
|
|
52
|
+
200
|
|
53
|
+
);
|
|
54
|
+
}
|
|
31
55
|
async function handleExecuteBatch({
|
|
32
56
|
body,
|
|
33
57
|
engine,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SpecNode } from '@ripplo/spec';
|
|
2
2
|
|
|
3
|
-
type DslNodeType = "assertAttribute" | "assertChecked" | "assertCount" | "assertDisabled" | "assertEnabled" | "assertFocused" | "assertNotChecked" | "assertNotFocused" | "assertNotVisible" | "assertText" | "assertUrl" | "assertValue" | "assertVisible" | "check" | "clear" | "click" | "clipboard" | "dblclick" | "drag" | "extractText" | "fill" | "focus" | "goto" | "handleDialog" | "hover" | "press" | "rightClick" | "scrollIntoView" | "select" | "setPermission" | "setViewport" | "type" | "uncheck" | "upload";
|
|
3
|
+
type DslNodeType = "assertAttribute" | "assertChecked" | "assertCount" | "assertDisabled" | "assertEnabled" | "assertFocused" | "assertNotChecked" | "assertNotFocused" | "assertNotVisible" | "assertObserver" | "assertText" | "assertUrl" | "assertValue" | "assertVisible" | "check" | "clear" | "click" | "clipboard" | "dblclick" | "drag" | "extractText" | "fill" | "focus" | "goto" | "handleDialog" | "hover" | "press" | "rightClick" | "scrollIntoView" | "select" | "setPermission" | "setViewport" | "type" | "uncheck" | "upload";
|
|
4
4
|
type StepBaseFields = "comment" | "id" | "label" | "next" | "timeout";
|
|
5
5
|
type DslNodeInput = SpecNode extends infer N ? N extends SpecNode ? N["type"] extends DslNodeType ? Omit<N, StepBaseFields> : never : never : never;
|
|
6
6
|
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { S as Step } from './step-De52hTLd.js';
|
|
3
|
+
|
|
4
|
+
declare const DEFAULT_WATCH_PATHS: ReadonlyArray<string>;
|
|
5
|
+
declare const DEFAULT_IGNORE_PATHS: ReadonlyArray<string>;
|
|
6
|
+
declare const dslConfigSchema: z.ZodObject<{
|
|
7
|
+
appUrl: z.ZodString;
|
|
8
|
+
engineUrl: z.ZodString;
|
|
9
|
+
ignorePaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10
|
+
projectId: z.ZodString;
|
|
11
|
+
watchPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
12
|
+
webhookSecret: z.ZodString;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
type DslConfig = z.infer<typeof dslConfigSchema>;
|
|
15
|
+
interface CookieOptions {
|
|
16
|
+
readonly domain: string | undefined;
|
|
17
|
+
readonly expires: number | undefined;
|
|
18
|
+
readonly httpOnly: boolean | undefined;
|
|
19
|
+
readonly path: string | undefined;
|
|
20
|
+
readonly sameSite: "lax" | "none" | "strict" | undefined;
|
|
21
|
+
readonly secure: boolean | undefined;
|
|
22
|
+
}
|
|
23
|
+
interface CookieEntry {
|
|
24
|
+
readonly name: string;
|
|
25
|
+
readonly options: CookieOptions | undefined;
|
|
26
|
+
readonly value: string;
|
|
27
|
+
}
|
|
28
|
+
declare const TEST_VALUE_BRAND: unique symbol;
|
|
29
|
+
interface TestValue {
|
|
30
|
+
readonly [TEST_VALUE_BRAND]: true;
|
|
31
|
+
}
|
|
32
|
+
interface SetupContext {
|
|
33
|
+
readonly runId: string;
|
|
34
|
+
fixed(value: string): TestValue;
|
|
35
|
+
setCookie(name: string, value: string, options?: CookieOptions): void;
|
|
36
|
+
uniqueEmail(): TestValue;
|
|
37
|
+
uniqueId(prefix: string): TestValue;
|
|
38
|
+
}
|
|
39
|
+
interface TeardownContext<TData extends Record<string, string>> {
|
|
40
|
+
readonly data: TData;
|
|
41
|
+
}
|
|
42
|
+
declare const PRECONDITION_DATA: unique symbol;
|
|
43
|
+
declare const PRECONDITION_DEPS: unique symbol;
|
|
44
|
+
declare const PRECONDITION_NAME: unique symbol;
|
|
45
|
+
interface Precondition<TData extends Record<string, string> = Record<string, string>, TDeps extends Record<string, Record<string, string>> = Record<string, Record<string, string>>> {
|
|
46
|
+
readonly [PRECONDITION_DATA]: TData;
|
|
47
|
+
readonly [PRECONDITION_DEPS]: TDeps;
|
|
48
|
+
readonly [PRECONDITION_NAME]: string;
|
|
49
|
+
}
|
|
50
|
+
type PreconditionData<T extends Precondition> = T[typeof PRECONDITION_DATA];
|
|
51
|
+
type PreconditionDeps<T extends Precondition> = T[typeof PRECONDITION_DEPS];
|
|
52
|
+
interface PreconditionDefinition {
|
|
53
|
+
readonly dependsOn: ReadonlyArray<string>;
|
|
54
|
+
readonly depMapping: ReadonlyArray<readonly [string, string]>;
|
|
55
|
+
readonly description: string;
|
|
56
|
+
readonly implemented: boolean;
|
|
57
|
+
readonly name: string;
|
|
58
|
+
readonly returns: ReadonlyArray<string>;
|
|
59
|
+
readonly teardown: ((ctx: TeardownContext<Record<string, string>>) => Promise<void>) | undefined;
|
|
60
|
+
readonly setup: (ctx: SetupContext, deps: Record<string, Record<string, string>>) => Promise<Record<string, TestValue>>;
|
|
61
|
+
}
|
|
62
|
+
type VarsFn<T> = (vars: Record<string, Record<string, string>>) => T;
|
|
63
|
+
interface TestDefinition {
|
|
64
|
+
readonly description: string;
|
|
65
|
+
readonly expectedOutcome: string;
|
|
66
|
+
readonly id: string;
|
|
67
|
+
readonly implemented: boolean;
|
|
68
|
+
readonly name: string;
|
|
69
|
+
readonly requires: ReadonlyArray<string>;
|
|
70
|
+
readonly requiresKeys: Record<string, string>;
|
|
71
|
+
readonly startsAtFn: VarsFn<string> | undefined;
|
|
72
|
+
readonly stepsFn: VarsFn<ReadonlyArray<Step>> | undefined;
|
|
73
|
+
readonly uiOnly: boolean | undefined;
|
|
74
|
+
}
|
|
75
|
+
interface UnimplementedItems {
|
|
76
|
+
readonly observers: ReadonlyArray<string>;
|
|
77
|
+
readonly preconditions: ReadonlyArray<string>;
|
|
78
|
+
readonly tests: ReadonlyArray<string>;
|
|
79
|
+
}
|
|
80
|
+
declare const OBSERVER_INPUT: unique symbol;
|
|
81
|
+
declare const OBSERVER_NAME: unique symbol;
|
|
82
|
+
interface ObserverHandle<TInput = unknown> {
|
|
83
|
+
readonly [OBSERVER_INPUT]: TInput;
|
|
84
|
+
readonly [OBSERVER_NAME]: string;
|
|
85
|
+
}
|
|
86
|
+
type ObserverInput<T extends ObserverHandle> = T[typeof OBSERVER_INPUT];
|
|
87
|
+
declare const OBSERVER_OUTCOME_BRAND: unique symbol;
|
|
88
|
+
type ObserverOutcome = {
|
|
89
|
+
readonly kind: "pass";
|
|
90
|
+
readonly [OBSERVER_OUTCOME_BRAND]: true;
|
|
91
|
+
} | {
|
|
92
|
+
readonly kind: "retry";
|
|
93
|
+
readonly [OBSERVER_OUTCOME_BRAND]: true;
|
|
94
|
+
readonly reason: string;
|
|
95
|
+
} | {
|
|
96
|
+
readonly kind: "fail";
|
|
97
|
+
readonly [OBSERVER_OUTCOME_BRAND]: true;
|
|
98
|
+
readonly reason: string;
|
|
99
|
+
};
|
|
100
|
+
interface ObserverContext {
|
|
101
|
+
readonly runId: string;
|
|
102
|
+
fail(reason: string): ObserverOutcome;
|
|
103
|
+
pass(): ObserverOutcome;
|
|
104
|
+
retry(reason: string): ObserverOutcome;
|
|
105
|
+
}
|
|
106
|
+
type ObserverBudgetTier = "async" | "fast" | "slow";
|
|
107
|
+
interface ObserverDefinition {
|
|
108
|
+
readonly budget: ObserverBudgetTier;
|
|
109
|
+
readonly description: string;
|
|
110
|
+
readonly implemented: boolean;
|
|
111
|
+
readonly name: string;
|
|
112
|
+
readonly run: (ctx: ObserverContext, params: Record<string, string>) => Promise<ObserverOutcome>;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export { type CookieEntry as C, DEFAULT_IGNORE_PATHS as D, type ObserverHandle as O, type Precondition as P, type SetupContext as S, type TeardownContext as T, type UnimplementedItems as U, type ObserverInput as a, type ObserverBudgetTier as b, type ObserverOutcome as c, type CookieOptions as d, DEFAULT_WATCH_PATHS as e, type DslConfig as f, type ObserverContext as g, type ObserverDefinition as h, type PreconditionDeps as i, type PreconditionData as j, type TestValue as k, type PreconditionDefinition as l, type TestDefinition as m };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ripplo/testing",
|
|
3
3
|
"description": "TypeScript DSL for defining and running Ripplo e2e workflow tests",
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "0.1.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"tsup": "^8.5.1",
|
|
72
72
|
"typescript": "catalog:",
|
|
73
73
|
"vitest": "^4.1.4",
|
|
74
|
-
"@ripplo/
|
|
75
|
-
"@ripplo/
|
|
74
|
+
"@ripplo/eslint-config": "0.0.0",
|
|
75
|
+
"@ripplo/spec": "^0.0.0"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"dotenv": "^16.0.0 || ^17.0.0",
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { S as Step } from './step-DLfkKI3V.js';
|
|
3
|
-
|
|
4
|
-
declare const DEFAULT_WATCH_PATHS: ReadonlyArray<string>;
|
|
5
|
-
declare const DEFAULT_IGNORE_PATHS: ReadonlyArray<string>;
|
|
6
|
-
declare const dslConfigSchema: z.ZodObject<{
|
|
7
|
-
appUrl: z.ZodString;
|
|
8
|
-
ignorePaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
9
|
-
preconditionsUrl: z.ZodString;
|
|
10
|
-
projectId: z.ZodString;
|
|
11
|
-
watchPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
12
|
-
webhookSecret: z.ZodString;
|
|
13
|
-
}, z.core.$strip>;
|
|
14
|
-
type DslConfig = z.infer<typeof dslConfigSchema>;
|
|
15
|
-
interface CookieOptions {
|
|
16
|
-
readonly domain: string | undefined;
|
|
17
|
-
readonly expires: number | undefined;
|
|
18
|
-
readonly httpOnly: boolean | undefined;
|
|
19
|
-
readonly path: string | undefined;
|
|
20
|
-
readonly sameSite: "lax" | "none" | "strict" | undefined;
|
|
21
|
-
readonly secure: boolean | undefined;
|
|
22
|
-
}
|
|
23
|
-
interface CookieEntry {
|
|
24
|
-
readonly name: string;
|
|
25
|
-
readonly options: CookieOptions | undefined;
|
|
26
|
-
readonly value: string;
|
|
27
|
-
}
|
|
28
|
-
declare const TEST_VALUE_BRAND: unique symbol;
|
|
29
|
-
interface TestValue {
|
|
30
|
-
readonly [TEST_VALUE_BRAND]: true;
|
|
31
|
-
}
|
|
32
|
-
interface SetupContext {
|
|
33
|
-
readonly runId: string;
|
|
34
|
-
fixed(value: string): TestValue;
|
|
35
|
-
setCookie(name: string, value: string, options?: CookieOptions): void;
|
|
36
|
-
uniqueEmail(): TestValue;
|
|
37
|
-
uniqueId(prefix: string): TestValue;
|
|
38
|
-
}
|
|
39
|
-
interface TeardownContext<TData extends Record<string, string>> {
|
|
40
|
-
readonly data: TData;
|
|
41
|
-
}
|
|
42
|
-
declare const PRECONDITION_DATA: unique symbol;
|
|
43
|
-
declare const PRECONDITION_DEPS: unique symbol;
|
|
44
|
-
declare const PRECONDITION_NAME: unique symbol;
|
|
45
|
-
interface Precondition<TData extends Record<string, string> = Record<string, string>, TDeps extends Record<string, Record<string, string>> = Record<string, Record<string, string>>> {
|
|
46
|
-
readonly [PRECONDITION_DATA]: TData;
|
|
47
|
-
readonly [PRECONDITION_DEPS]: TDeps;
|
|
48
|
-
readonly [PRECONDITION_NAME]: string;
|
|
49
|
-
}
|
|
50
|
-
type PreconditionData<T extends Precondition> = T[typeof PRECONDITION_DATA];
|
|
51
|
-
type PreconditionDeps<T extends Precondition> = T[typeof PRECONDITION_DEPS];
|
|
52
|
-
interface PreconditionDefinition {
|
|
53
|
-
readonly dependsOn: ReadonlyArray<string>;
|
|
54
|
-
readonly depMapping: ReadonlyArray<readonly [string, string]>;
|
|
55
|
-
readonly description: string;
|
|
56
|
-
readonly implemented: boolean;
|
|
57
|
-
readonly name: string;
|
|
58
|
-
readonly returns: ReadonlyArray<string>;
|
|
59
|
-
readonly teardown: ((ctx: TeardownContext<Record<string, string>>) => Promise<void>) | undefined;
|
|
60
|
-
readonly setup: (ctx: SetupContext, deps: Record<string, Record<string, string>>) => Promise<Record<string, TestValue>>;
|
|
61
|
-
}
|
|
62
|
-
type VarsFn<T> = (vars: Record<string, Record<string, string>>) => T;
|
|
63
|
-
interface TestDefinition {
|
|
64
|
-
readonly description: string;
|
|
65
|
-
readonly expectedOutcome: string;
|
|
66
|
-
readonly id: string;
|
|
67
|
-
readonly implemented: boolean;
|
|
68
|
-
readonly name: string;
|
|
69
|
-
readonly requires: ReadonlyArray<string>;
|
|
70
|
-
readonly requiresKeys: Record<string, string>;
|
|
71
|
-
readonly startsAtFn: VarsFn<string> | undefined;
|
|
72
|
-
readonly stepsFn: VarsFn<ReadonlyArray<Step>> | undefined;
|
|
73
|
-
}
|
|
74
|
-
interface UnimplementedItems {
|
|
75
|
-
readonly preconditions: ReadonlyArray<string>;
|
|
76
|
-
readonly tests: ReadonlyArray<string>;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
type PreconditionRecord = Record<string, Precondition>;
|
|
80
|
-
type ResolveDeps<TDeps extends PreconditionRecord> = {
|
|
81
|
-
readonly [K in keyof TDeps]: PreconditionData<TDeps[K]>;
|
|
82
|
-
};
|
|
83
|
-
type ResolveData<T extends Record<string, TestValue>> = {
|
|
84
|
-
readonly [K in keyof T]: string;
|
|
85
|
-
};
|
|
86
|
-
interface PreconditionNeedsSetup {
|
|
87
|
-
readonly contract: <TData extends Record<string, string>>() => Precondition<TData>;
|
|
88
|
-
readonly description: (text: string) => PreconditionNeedsSetup;
|
|
89
|
-
readonly notImplemented: () => Precondition<Record<string, never>>;
|
|
90
|
-
readonly requires: <TDeps extends PreconditionRecord>(deps: TDeps) => PreconditionNeedsSetupWithDeps<TDeps>;
|
|
91
|
-
readonly setup: <TData extends Record<string, TestValue>>(fn: (ctx: SetupContext) => Promise<TData>) => PreconditionHasSetup<ResolveData<TData>>;
|
|
92
|
-
}
|
|
93
|
-
interface PreconditionNeedsSetupWithDeps<TDeps extends PreconditionRecord> {
|
|
94
|
-
readonly contract: <TData extends Record<string, string>>() => Precondition<TData, ResolveDeps<TDeps>>;
|
|
95
|
-
readonly description: (text: string) => PreconditionNeedsSetupWithDeps<TDeps>;
|
|
96
|
-
readonly notImplemented: () => Precondition<Record<string, never>>;
|
|
97
|
-
readonly requires: <TDeps2 extends PreconditionRecord>(deps: TDeps2) => PreconditionNeedsSetupWithDeps<TDeps2>;
|
|
98
|
-
readonly setup: <TData extends Record<string, TestValue>>(fn: (ctx: SetupContext, deps: ResolveDeps<TDeps>) => Promise<TData>) => PreconditionHasSetup<ResolveData<TData>>;
|
|
99
|
-
}
|
|
100
|
-
interface PreconditionHasSetup<TData extends Record<string, string>> {
|
|
101
|
-
readonly teardown: (fn: (ctx: TeardownContext<TData>) => Promise<void>) => Precondition<TData>;
|
|
102
|
-
}
|
|
103
|
-
interface TestNeedsName {
|
|
104
|
-
readonly name: (displayName: string) => TestNeedsRequires;
|
|
105
|
-
}
|
|
106
|
-
interface TestNeedsRequires {
|
|
107
|
-
readonly description: (text: string) => TestNeedsRequires;
|
|
108
|
-
readonly requires: <TReqs extends PreconditionRecord>(reqs: TReqs) => TestNeedsOutcome<ResolveDeps<TReqs>>;
|
|
109
|
-
}
|
|
110
|
-
interface TestNeedsOutcome<TVars extends Record<string, Record<string, string>>> {
|
|
111
|
-
readonly description: (text: string) => TestNeedsOutcome<TVars>;
|
|
112
|
-
readonly expectedOutcome: (text: string) => TestNeedsStartsAt<TVars>;
|
|
113
|
-
}
|
|
114
|
-
interface TestNeedsStartsAt<TVars extends Record<string, Record<string, string>>> {
|
|
115
|
-
readonly notImplemented: () => void;
|
|
116
|
-
readonly startsAt: (fn: (vars: TVars) => string) => TestNeedsSteps<TVars>;
|
|
117
|
-
}
|
|
118
|
-
interface TestNeedsSteps<TVars extends Record<string, Record<string, string>>> {
|
|
119
|
-
readonly steps: (fn: (vars: TVars) => ReadonlyArray<Step>) => void;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
interface PreconditionImpl<TData extends Record<string, string>, TDeps extends Record<string, Record<string, string>>> {
|
|
123
|
-
readonly setup: (ctx: SetupContext, deps: TDeps) => Promise<Record<string, TestValue>>;
|
|
124
|
-
readonly teardown: (ctx: TeardownContext<TData>) => Promise<void>;
|
|
125
|
-
}
|
|
126
|
-
interface RipploBuilder {
|
|
127
|
-
readonly getConfig: () => DslConfig;
|
|
128
|
-
readonly getPreconditions: () => ReadonlyArray<PreconditionDefinition>;
|
|
129
|
-
readonly getTests: () => ReadonlyArray<TestDefinition>;
|
|
130
|
-
readonly getUnimplemented: () => UnimplementedItems;
|
|
131
|
-
readonly implement: <TData extends Record<string, string>, TDeps extends Record<string, Record<string, string>>>(handle: Precondition<TData, TDeps>, impl: PreconditionImpl<TData, TDeps>) => void;
|
|
132
|
-
readonly precondition: (name: string) => PreconditionNeedsSetup;
|
|
133
|
-
readonly test: (id: string) => TestNeedsName;
|
|
134
|
-
}
|
|
135
|
-
declare function createRipplo(rawConfig: DslConfig): RipploBuilder;
|
|
136
|
-
|
|
137
|
-
export { type CookieEntry as C, DEFAULT_IGNORE_PATHS as D, type Precondition as P, type RipploBuilder as R, type SetupContext as S, type TeardownContext as T, type CookieOptions as a, DEFAULT_WATCH_PATHS as b, type DslConfig as c, type PreconditionDeps as d, type PreconditionImpl as e, type PreconditionRecord as f, type ResolveDeps as g, createRipplo as h };
|