@functional-examples/test 0.0.0-alpha.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.
Files changed (52) hide show
  1. package/dist/commands/index.d.ts +41 -0
  2. package/dist/commands/index.d.ts.map +1 -0
  3. package/dist/commands/index.js +9 -0
  4. package/dist/commands/index.js.map +1 -0
  5. package/dist/commands/list.d.ts +10 -0
  6. package/dist/commands/list.d.ts.map +1 -0
  7. package/dist/commands/list.js +57 -0
  8. package/dist/commands/list.js.map +1 -0
  9. package/dist/commands/test.d.ts +19 -0
  10. package/dist/commands/test.d.ts.map +1 -0
  11. package/dist/commands/test.js +110 -0
  12. package/dist/commands/test.js.map +1 -0
  13. package/dist/index.d.ts +13 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +74 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/integration.spec.d.ts +1 -0
  18. package/dist/reporters/index.d.ts +5 -0
  19. package/dist/reporters/index.d.ts.map +1 -0
  20. package/dist/reporters/index.js +4 -0
  21. package/dist/reporters/index.js.map +1 -0
  22. package/dist/reporters/pretty.d.ts +3 -0
  23. package/dist/reporters/pretty.d.ts.map +1 -0
  24. package/dist/reporters/pretty.js +58 -0
  25. package/dist/reporters/pretty.js.map +1 -0
  26. package/dist/reporters/resolve.d.ts +7 -0
  27. package/dist/reporters/resolve.d.ts.map +1 -0
  28. package/dist/reporters/resolve.js +39 -0
  29. package/dist/reporters/resolve.js.map +1 -0
  30. package/dist/reporters/tap.d.ts +3 -0
  31. package/dist/reporters/tap.d.ts.map +1 -0
  32. package/dist/reporters/tap.js +53 -0
  33. package/dist/reporters/tap.js.map +1 -0
  34. package/dist/reporters/types.d.ts +50 -0
  35. package/dist/reporters/types.d.ts.map +1 -0
  36. package/dist/reporters/types.js +2 -0
  37. package/dist/reporters/types.js.map +1 -0
  38. package/dist/runner.d.ts +15 -0
  39. package/dist/runner.d.ts.map +1 -0
  40. package/dist/runner.js +232 -0
  41. package/dist/runner.js.map +1 -0
  42. package/dist/runner.spec.d.ts +1 -0
  43. package/dist/schema.d.ts +298 -0
  44. package/dist/schema.d.ts.map +1 -0
  45. package/dist/schema.js +115 -0
  46. package/dist/schema.js.map +1 -0
  47. package/dist/schema.spec.d.ts +1 -0
  48. package/dist/types.d.ts +37 -0
  49. package/dist/types.d.ts.map +1 -0
  50. package/dist/types.js +2 -0
  51. package/dist/types.js.map +1 -0
  52. package/package.json +54 -0
@@ -0,0 +1,50 @@
1
+ import type { Example } from '@functional-examples/devkit';
2
+ /**
3
+ * Result of a single test execution
4
+ */
5
+ export interface TestResult {
6
+ /** Example ID or path */
7
+ example: string;
8
+ /** Test case name */
9
+ test: string;
10
+ /** Whether the test passed */
11
+ passed: boolean;
12
+ /** Execution duration in ms */
13
+ duration: number;
14
+ /** Error message if failed */
15
+ error?: string;
16
+ /** Actual command output */
17
+ actual?: {
18
+ exitCode: number;
19
+ stdout: string;
20
+ stderr: string;
21
+ };
22
+ }
23
+ /**
24
+ * Summary of test run
25
+ */
26
+ export interface TestSummary {
27
+ passed: number;
28
+ failed: number;
29
+ bail?: boolean;
30
+ }
31
+ /**
32
+ * Reporter interface for test output
33
+ */
34
+ export interface Reporter {
35
+ /** Called before running tests */
36
+ start(examples: Example[]): void | Promise<void>;
37
+ /** Called after each test */
38
+ report(result: TestResult, verbose: boolean): void | Promise<void>;
39
+ /** Called after all tests complete */
40
+ finish(summary: TestSummary): void | Promise<void>;
41
+ }
42
+ /**
43
+ * Factory function that creates a reporter instance
44
+ */
45
+ export type ReporterFactory = () => Reporter;
46
+ /**
47
+ * Reporter config can be a factory or module path string
48
+ */
49
+ export type ReporterConfig = ReporterFactory | string;
50
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/reporters/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,yBAAyB;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,MAAM,EAAE,OAAO,CAAC;IAChB,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,MAAM,CAAC,EAAE;QACP,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,kCAAkC;IAClC,KAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,6BAA6B;IAC7B,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE,sCAAsC;IACtC,MAAM,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACpD;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,QAAQ,CAAC;AAE7C;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,eAAe,GAAG,MAAM,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/reporters/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ import type { TestCase } from './schema.js';
2
+ import type { TestResult } from './reporters/types.js';
3
+ export interface RunTestOptions {
4
+ timeout: number;
5
+ }
6
+ /**
7
+ * Run a single test case against an example.
8
+ * Dispatches to runSteps() for multi-step test cases.
9
+ */
10
+ export declare function runTest(exampleId: string, examplePath: string, testCase: TestCase, options: RunTestOptions): Promise<TestResult>;
11
+ /**
12
+ * Normalize test field to array
13
+ */
14
+ export declare function normalizeTests(test: TestCase | TestCase[]): TestCase[];
15
+ //# sourceMappingURL=runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAkD,MAAM,aAAa,CAAC;AAC5F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAkLvD,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;CACjB;AAoED;;;GAGG;AACH,wBAAsB,OAAO,CAC3B,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,UAAU,CAAC,CAqCrB;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,QAAQ,GAAG,QAAQ,EAAE,GAAG,QAAQ,EAAE,CAEtE"}
package/dist/runner.js ADDED
@@ -0,0 +1,232 @@
1
+ import { spawn } from 'child_process';
2
+ import { existsSync, readFileSync, statSync } from 'fs';
3
+ import { isAbsolute, join } from 'path';
4
+ /**
5
+ * Execute a command and capture output
6
+ */
7
+ async function executeCommand(command, options) {
8
+ return new Promise((resolve, reject) => {
9
+ const proc = spawn(command, {
10
+ cwd: options.cwd,
11
+ env: { ...process.env, ...options.env },
12
+ shell: true,
13
+ });
14
+ let stdout = '';
15
+ let stderr = '';
16
+ proc.stdout.on('data', (data) => {
17
+ stdout += data.toString();
18
+ });
19
+ proc.stderr.on('data', (data) => {
20
+ stderr += data.toString();
21
+ });
22
+ const timer = setTimeout(() => {
23
+ proc.kill('SIGTERM');
24
+ reject(new Error(`Command timed out after ${options.timeout}ms`));
25
+ }, options.timeout);
26
+ proc.on('close', (code) => {
27
+ clearTimeout(timer);
28
+ resolve({
29
+ exitCode: code ?? 1,
30
+ stdout,
31
+ stderr,
32
+ });
33
+ });
34
+ proc.on('error', (err) => {
35
+ clearTimeout(timer);
36
+ reject(err);
37
+ });
38
+ });
39
+ }
40
+ /**
41
+ * Resolve an assertion path relative to the test's working directory.
42
+ */
43
+ function resolveAssertionPath(baseCwd, filePath) {
44
+ return isAbsolute(filePath) ? filePath : join(baseCwd, filePath);
45
+ }
46
+ /**
47
+ * Check assertions against actual output
48
+ */
49
+ function checkAssertions(assertions, actual, cwd) {
50
+ const failures = [];
51
+ if (!assertions)
52
+ return failures;
53
+ if (assertions.exitCode !== undefined && actual.exitCode !== assertions.exitCode) {
54
+ failures.push(`Expected exit code ${assertions.exitCode}, got ${actual.exitCode}`);
55
+ }
56
+ if (assertions.stdout?.contains && !actual.stdout.includes(assertions.stdout.contains)) {
57
+ failures.push(`Expected stdout to contain "${assertions.stdout.contains}"`);
58
+ }
59
+ if (assertions.stdout?.matches) {
60
+ try {
61
+ const regex = new RegExp(assertions.stdout.matches);
62
+ if (!regex.test(actual.stdout)) {
63
+ failures.push(`Expected stdout to match /${assertions.stdout.matches}/`);
64
+ }
65
+ }
66
+ catch {
67
+ failures.push(`Invalid stdout regex: ${assertions.stdout.matches}`);
68
+ }
69
+ }
70
+ if (assertions.stderr?.contains && !actual.stderr.includes(assertions.stderr.contains)) {
71
+ failures.push(`Expected stderr to contain "${assertions.stderr.contains}"`);
72
+ }
73
+ if (assertions.stderr?.matches) {
74
+ try {
75
+ const regex = new RegExp(assertions.stderr.matches);
76
+ if (!regex.test(actual.stderr)) {
77
+ failures.push(`Expected stderr to match /${assertions.stderr.matches}/`);
78
+ }
79
+ }
80
+ catch {
81
+ failures.push(`Invalid stderr regex: ${assertions.stderr.matches}`);
82
+ }
83
+ }
84
+ // File existence and content assertions (singular + array)
85
+ const fileChecks = [
86
+ ...(assertions.file ? [assertions.file] : []),
87
+ ...(assertions.files ?? []),
88
+ ];
89
+ for (const fileAssertion of fileChecks) {
90
+ const resolved = resolveAssertionPath(cwd, fileAssertion.path);
91
+ if (!existsSync(resolved)) {
92
+ failures.push(`Expected file to exist: ${fileAssertion.path}`);
93
+ }
94
+ else {
95
+ const content = readFileSync(resolved, 'utf-8');
96
+ if (fileAssertion.contains && !content.includes(fileAssertion.contains)) {
97
+ failures.push(`Expected file "${fileAssertion.path}" to contain "${fileAssertion.contains}"`);
98
+ }
99
+ if (fileAssertion.matches) {
100
+ try {
101
+ const regex = new RegExp(fileAssertion.matches);
102
+ if (!regex.test(content)) {
103
+ failures.push(`Expected file "${fileAssertion.path}" to match /${fileAssertion.matches}/`);
104
+ }
105
+ }
106
+ catch {
107
+ failures.push(`Invalid file regex: ${fileAssertion.matches}`);
108
+ }
109
+ }
110
+ }
111
+ }
112
+ // Directory existence assertions (singular + array)
113
+ const dirChecks = [
114
+ ...(assertions.dir ? [assertions.dir] : []),
115
+ ...(assertions.directories ?? []),
116
+ ];
117
+ for (const dirAssertion of dirChecks) {
118
+ const resolved = resolveAssertionPath(cwd, dirAssertion.path);
119
+ if (!existsSync(resolved) || !statSync(resolved).isDirectory()) {
120
+ failures.push(`Expected directory to exist: ${dirAssertion.path}`);
121
+ }
122
+ }
123
+ // Negation wrapper — inverts pass/fail of inner assertions
124
+ if (assertions.not) {
125
+ const innerFailures = checkAssertions(assertions.not, actual, cwd);
126
+ if (innerFailures.length === 0) {
127
+ failures.push('Expected NOT: all negated assertions passed but should have failed');
128
+ }
129
+ }
130
+ return failures;
131
+ }
132
+ /**
133
+ * Run a multi-step test case sequentially.
134
+ * Stops on the first step failure. Steps with no assertions
135
+ * implicitly assert exitCode === 0.
136
+ */
137
+ async function runSteps(exampleId, examplePath, testCase, options) {
138
+ const startTime = Date.now();
139
+ let lastActual;
140
+ const defaults = testCase.options;
141
+ for (let i = 0; i < testCase.steps.length; i++) {
142
+ const step = testCase.steps[i];
143
+ const stepCwd = step.cwd ?? defaults?.cwd;
144
+ const cwd = stepCwd ? join(examplePath, stepCwd) : examplePath;
145
+ const env = defaults?.env || step.env
146
+ ? { ...defaults?.env, ...step.env }
147
+ : undefined;
148
+ try {
149
+ const actual = await executeCommand(step.command, {
150
+ cwd,
151
+ env,
152
+ timeout: step.timeout ?? defaults?.timeout ?? options.timeout,
153
+ });
154
+ lastActual = actual;
155
+ // Use explicit assertions if provided, otherwise assert exitCode 0
156
+ const assertions = step.assertions ?? { exitCode: 0 };
157
+ const failures = checkAssertions(assertions, actual, cwd);
158
+ if (failures.length > 0) {
159
+ return {
160
+ example: exampleId,
161
+ test: testCase.name,
162
+ passed: false,
163
+ duration: Date.now() - startTime,
164
+ error: failures.map((f) => `Step ${i + 1}: ${f}`).join('\n'),
165
+ actual,
166
+ };
167
+ }
168
+ }
169
+ catch (err) {
170
+ return {
171
+ example: exampleId,
172
+ test: testCase.name,
173
+ passed: false,
174
+ duration: Date.now() - startTime,
175
+ error: `Step ${i + 1}: ${err instanceof Error ? err.message : String(err)}`,
176
+ };
177
+ }
178
+ }
179
+ return {
180
+ example: exampleId,
181
+ test: testCase.name,
182
+ passed: true,
183
+ duration: Date.now() - startTime,
184
+ actual: lastActual,
185
+ };
186
+ }
187
+ /**
188
+ * Run a single test case against an example.
189
+ * Dispatches to runSteps() for multi-step test cases.
190
+ */
191
+ export async function runTest(exampleId, examplePath, testCase, options) {
192
+ if ('steps' in testCase) {
193
+ return runSteps(exampleId, examplePath, testCase, options);
194
+ }
195
+ const tc = testCase;
196
+ const startTime = Date.now();
197
+ const cwd = tc.options.cwd
198
+ ? join(examplePath, tc.options.cwd)
199
+ : examplePath;
200
+ try {
201
+ const actual = await executeCommand(tc.options.command, {
202
+ cwd,
203
+ env: tc.options.env,
204
+ timeout: tc.options.timeout ?? options.timeout,
205
+ });
206
+ const failures = checkAssertions(tc.assertions, actual, cwd);
207
+ return {
208
+ example: exampleId,
209
+ test: testCase.name,
210
+ passed: failures.length === 0,
211
+ duration: Date.now() - startTime,
212
+ error: failures.length > 0 ? failures.join('\n') : undefined,
213
+ actual,
214
+ };
215
+ }
216
+ catch (err) {
217
+ return {
218
+ example: exampleId,
219
+ test: testCase.name,
220
+ passed: false,
221
+ duration: Date.now() - startTime,
222
+ error: err instanceof Error ? err.message : String(err),
223
+ };
224
+ }
225
+ }
226
+ /**
227
+ * Normalize test field to array
228
+ */
229
+ export function normalizeTests(test) {
230
+ return Array.isArray(test) ? test : [test];
231
+ }
232
+ //# sourceMappingURL=runner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runner.js","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAgBxC;;GAEG;AACH,KAAK,UAAU,cAAc,CAC3B,OAAe,EACf,OAAuB;IAEvB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,EAAE;YAC1B,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE;YACvC,KAAK,EAAE,IAAI;SACZ,CAAC,CAAC;QAEH,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,IAAI,MAAM,GAAG,EAAE,CAAC;QAEhB,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;YAC9B,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC5B,CAAC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SACxD,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,IAA2B;IACxD,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAC7C,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,298 @@
1
+ import { z } from 'zod';
2
+ declare const fileAssertionsSchema: z.ZodOptional<z.ZodObject<{
3
+ path: z.ZodString;
4
+ contains: z.ZodOptional<z.ZodString>;
5
+ matches: z.ZodOptional<z.ZodString>;
6
+ }, z.core.$strict>>;
7
+ declare const dirAssertionsSchema: z.ZodOptional<z.ZodObject<{
8
+ path: z.ZodString;
9
+ }, z.core.$strict>>;
10
+ /**
11
+ * Test assertions
12
+ *
13
+ * Uses z.lazy() for the `not` field to allow recursive self-reference
14
+ * (e.g. `not: { file: { path: 'foo' } }` negates inner assertions).
15
+ */
16
+ declare const assertionsSchema: z.ZodOptional<any>;
17
+ /**
18
+ * Shared execution defaults (cwd, env, timeout) — no command
19
+ */
20
+ declare const testDefaultsSchema: z.ZodObject<{
21
+ /** Working directory relative to example */
22
+ cwd: z.ZodOptional<z.ZodString>;
23
+ /** Environment variables */
24
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
25
+ /** Timeout in milliseconds */
26
+ timeout: z.ZodOptional<z.ZodNumber>;
27
+ }, z.core.$strict>;
28
+ /**
29
+ * Test execution options (single-command format)
30
+ */
31
+ declare const testOptionsSchema: z.ZodObject<{
32
+ cwd: z.ZodOptional<z.ZodString>;
33
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
34
+ timeout: z.ZodOptional<z.ZodNumber>;
35
+ command: z.ZodString;
36
+ }, z.core.$strict>;
37
+ /**
38
+ * A command step in a multi-step sequence
39
+ */
40
+ export declare const commandStepSchema: z.ZodObject<{
41
+ /** Command to execute */
42
+ command: z.ZodString;
43
+ /** Working directory relative to example */
44
+ cwd: z.ZodOptional<z.ZodString>;
45
+ /** Environment variables */
46
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
47
+ /** Timeout in milliseconds */
48
+ timeout: z.ZodOptional<z.ZodNumber>;
49
+ /** Assertions for this step (defaults to exitCode === 0 if omitted) */
50
+ assertions: z.ZodOptional<any>;
51
+ }, z.core.$strict>;
52
+ /**
53
+ * Step union — currently only command steps, extensible later
54
+ */
55
+ declare const testStepSchema: z.ZodObject<{
56
+ /** Command to execute */
57
+ command: z.ZodString;
58
+ /** Working directory relative to example */
59
+ cwd: z.ZodOptional<z.ZodString>;
60
+ /** Environment variables */
61
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
62
+ /** Timeout in milliseconds */
63
+ timeout: z.ZodOptional<z.ZodNumber>;
64
+ /** Assertions for this step (defaults to exitCode === 0 if omitted) */
65
+ assertions: z.ZodOptional<any>;
66
+ }, z.core.$strict>;
67
+ /**
68
+ * Single test case — supports either options+assertions or steps format
69
+ */
70
+ declare const optionsTestCaseSchema: z.ZodObject<{
71
+ /** Test name */
72
+ name: z.ZodString;
73
+ options: z.ZodObject<{
74
+ cwd: z.ZodOptional<z.ZodString>;
75
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
76
+ timeout: z.ZodOptional<z.ZodNumber>;
77
+ command: z.ZodString;
78
+ }, z.core.$strict>;
79
+ assertions: z.ZodOptional<any>;
80
+ }, z.core.$strict>;
81
+ declare const stepsTestCaseSchema: z.ZodObject<{
82
+ /** Test name */
83
+ name: z.ZodString;
84
+ /** Default cwd, env, timeout inherited by all steps */
85
+ options: z.ZodOptional<z.ZodObject<{
86
+ /** Working directory relative to example */
87
+ cwd: z.ZodOptional<z.ZodString>;
88
+ /** Environment variables */
89
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
90
+ /** Timeout in milliseconds */
91
+ timeout: z.ZodOptional<z.ZodNumber>;
92
+ }, z.core.$strict>>;
93
+ steps: z.ZodArray<z.ZodObject<{
94
+ /** Command to execute */
95
+ command: z.ZodString;
96
+ /** Working directory relative to example */
97
+ cwd: z.ZodOptional<z.ZodString>;
98
+ /** Environment variables */
99
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
100
+ /** Timeout in milliseconds */
101
+ timeout: z.ZodOptional<z.ZodNumber>;
102
+ /** Assertions for this step (defaults to exitCode === 0 if omitted) */
103
+ assertions: z.ZodOptional<any>;
104
+ }, z.core.$strict>>;
105
+ }, z.core.$strict>;
106
+ export declare const testCaseSchema: z.ZodUnion<readonly [z.ZodObject<{
107
+ /** Test name */
108
+ name: z.ZodString;
109
+ options: z.ZodObject<{
110
+ cwd: z.ZodOptional<z.ZodString>;
111
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
112
+ timeout: z.ZodOptional<z.ZodNumber>;
113
+ command: z.ZodString;
114
+ }, z.core.$strict>;
115
+ assertions: z.ZodOptional<any>;
116
+ }, z.core.$strict>, z.ZodObject<{
117
+ /** Test name */
118
+ name: z.ZodString;
119
+ /** Default cwd, env, timeout inherited by all steps */
120
+ options: z.ZodOptional<z.ZodObject<{
121
+ /** Working directory relative to example */
122
+ cwd: z.ZodOptional<z.ZodString>;
123
+ /** Environment variables */
124
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
125
+ /** Timeout in milliseconds */
126
+ timeout: z.ZodOptional<z.ZodNumber>;
127
+ }, z.core.$strict>>;
128
+ steps: z.ZodArray<z.ZodObject<{
129
+ /** Command to execute */
130
+ command: z.ZodString;
131
+ /** Working directory relative to example */
132
+ cwd: z.ZodOptional<z.ZodString>;
133
+ /** Environment variables */
134
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
135
+ /** Timeout in milliseconds */
136
+ timeout: z.ZodOptional<z.ZodNumber>;
137
+ /** Assertions for this step (defaults to exitCode === 0 if omitted) */
138
+ assertions: z.ZodOptional<any>;
139
+ }, z.core.$strict>>;
140
+ }, z.core.$strict>]>;
141
+ /**
142
+ * Metadata extension for test plugin
143
+ */
144
+ export declare const testMetadataSchema: z.ZodObject<{
145
+ test: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
146
+ /** Test name */
147
+ name: z.ZodString;
148
+ options: z.ZodObject<{
149
+ cwd: z.ZodOptional<z.ZodString>;
150
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
151
+ timeout: z.ZodOptional<z.ZodNumber>;
152
+ command: z.ZodString;
153
+ }, z.core.$strict>;
154
+ assertions: z.ZodOptional<any>;
155
+ }, z.core.$strict>, z.ZodObject<{
156
+ /** Test name */
157
+ name: z.ZodString;
158
+ /** Default cwd, env, timeout inherited by all steps */
159
+ options: z.ZodOptional<z.ZodObject<{
160
+ /** Working directory relative to example */
161
+ cwd: z.ZodOptional<z.ZodString>;
162
+ /** Environment variables */
163
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
164
+ /** Timeout in milliseconds */
165
+ timeout: z.ZodOptional<z.ZodNumber>;
166
+ }, z.core.$strict>>;
167
+ steps: z.ZodArray<z.ZodObject<{
168
+ /** Command to execute */
169
+ command: z.ZodString;
170
+ /** Working directory relative to example */
171
+ cwd: z.ZodOptional<z.ZodString>;
172
+ /** Environment variables */
173
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
174
+ /** Timeout in milliseconds */
175
+ timeout: z.ZodOptional<z.ZodNumber>;
176
+ /** Assertions for this step (defaults to exitCode === 0 if omitted) */
177
+ assertions: z.ZodOptional<any>;
178
+ }, z.core.$strict>>;
179
+ }, z.core.$strict>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
180
+ /** Test name */
181
+ name: z.ZodString;
182
+ options: z.ZodObject<{
183
+ cwd: z.ZodOptional<z.ZodString>;
184
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
185
+ timeout: z.ZodOptional<z.ZodNumber>;
186
+ command: z.ZodString;
187
+ }, z.core.$strict>;
188
+ assertions: z.ZodOptional<any>;
189
+ }, z.core.$strict>, z.ZodObject<{
190
+ /** Test name */
191
+ name: z.ZodString;
192
+ /** Default cwd, env, timeout inherited by all steps */
193
+ options: z.ZodOptional<z.ZodObject<{
194
+ /** Working directory relative to example */
195
+ cwd: z.ZodOptional<z.ZodString>;
196
+ /** Environment variables */
197
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
198
+ /** Timeout in milliseconds */
199
+ timeout: z.ZodOptional<z.ZodNumber>;
200
+ }, z.core.$strict>>;
201
+ steps: z.ZodArray<z.ZodObject<{
202
+ /** Command to execute */
203
+ command: z.ZodString;
204
+ /** Working directory relative to example */
205
+ cwd: z.ZodOptional<z.ZodString>;
206
+ /** Environment variables */
207
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
208
+ /** Timeout in milliseconds */
209
+ timeout: z.ZodOptional<z.ZodNumber>;
210
+ /** Assertions for this step (defaults to exitCode === 0 if omitted) */
211
+ assertions: z.ZodOptional<any>;
212
+ }, z.core.$strict>>;
213
+ }, z.core.$strict>]>>]>>;
214
+ }, z.core.$strip>;
215
+ export type OptionsTestCase = z.infer<typeof optionsTestCaseSchema>;
216
+ export type StepsTestCase = z.infer<typeof stepsTestCaseSchema>;
217
+ export type TestCase = z.infer<typeof testCaseSchema>;
218
+ export type TestDefaults = z.infer<typeof testDefaultsSchema>;
219
+ export type TestOptions = z.infer<typeof testOptionsSchema>;
220
+ export type TestAssertions = z.infer<typeof assertionsSchema>;
221
+ export type TestMetadata = z.infer<typeof testMetadataSchema>;
222
+ export type CommandStep = z.infer<typeof commandStepSchema>;
223
+ export type TestStep = z.infer<typeof testStepSchema>;
224
+ export type FileAssertions = z.infer<typeof fileAssertionsSchema>;
225
+ export type DirAssertions = z.infer<typeof dirAssertionsSchema>;
226
+ export declare const TEST_METADATA_JSON_SCHEMA: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<{
227
+ test: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject<{
228
+ /** Test name */
229
+ name: z.ZodString;
230
+ options: z.ZodObject<{
231
+ cwd: z.ZodOptional<z.ZodString>;
232
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
233
+ timeout: z.ZodOptional<z.ZodNumber>;
234
+ command: z.ZodString;
235
+ }, z.core.$strict>;
236
+ assertions: z.ZodOptional<any>;
237
+ }, z.core.$strict>, z.ZodObject<{
238
+ /** Test name */
239
+ name: z.ZodString;
240
+ /** Default cwd, env, timeout inherited by all steps */
241
+ options: z.ZodOptional<z.ZodObject<{
242
+ /** Working directory relative to example */
243
+ cwd: z.ZodOptional<z.ZodString>;
244
+ /** Environment variables */
245
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
246
+ /** Timeout in milliseconds */
247
+ timeout: z.ZodOptional<z.ZodNumber>;
248
+ }, z.core.$strict>>;
249
+ steps: z.ZodArray<z.ZodObject<{
250
+ /** Command to execute */
251
+ command: z.ZodString;
252
+ /** Working directory relative to example */
253
+ cwd: z.ZodOptional<z.ZodString>;
254
+ /** Environment variables */
255
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
256
+ /** Timeout in milliseconds */
257
+ timeout: z.ZodOptional<z.ZodNumber>;
258
+ /** Assertions for this step (defaults to exitCode === 0 if omitted) */
259
+ assertions: z.ZodOptional<any>;
260
+ }, z.core.$strict>>;
261
+ }, z.core.$strict>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
262
+ /** Test name */
263
+ name: z.ZodString;
264
+ options: z.ZodObject<{
265
+ cwd: z.ZodOptional<z.ZodString>;
266
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
267
+ timeout: z.ZodOptional<z.ZodNumber>;
268
+ command: z.ZodString;
269
+ }, z.core.$strict>;
270
+ assertions: z.ZodOptional<any>;
271
+ }, z.core.$strict>, z.ZodObject<{
272
+ /** Test name */
273
+ name: z.ZodString;
274
+ /** Default cwd, env, timeout inherited by all steps */
275
+ options: z.ZodOptional<z.ZodObject<{
276
+ /** Working directory relative to example */
277
+ cwd: z.ZodOptional<z.ZodString>;
278
+ /** Environment variables */
279
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
280
+ /** Timeout in milliseconds */
281
+ timeout: z.ZodOptional<z.ZodNumber>;
282
+ }, z.core.$strict>>;
283
+ steps: z.ZodArray<z.ZodObject<{
284
+ /** Command to execute */
285
+ command: z.ZodString;
286
+ /** Working directory relative to example */
287
+ cwd: z.ZodOptional<z.ZodString>;
288
+ /** Environment variables */
289
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
290
+ /** Timeout in milliseconds */
291
+ timeout: z.ZodOptional<z.ZodNumber>;
292
+ /** Assertions for this step (defaults to exitCode === 0 if omitted) */
293
+ assertions: z.ZodOptional<any>;
294
+ }, z.core.$strict>>;
295
+ }, z.core.$strict>]>>]>>;
296
+ }, z.core.$strip>>;
297
+ export {};
298
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAqBxB,QAAA,MAAM,oBAAoB;;;;mBAAiC,CAAC;AAS5D,QAAA,MAAM,mBAAmB;;mBAAgC,CAAC;AAE1D;;;;;GAKG;AAEH,QAAA,MAAM,gBAAgB,EAAE,CAAC,CAAC,WAAW,CAAC,GAAG,CAW5B,CAAC;AAEd;;GAEG;AACH,QAAA,MAAM,kBAAkB;IACtB,4CAA4C;;IAE5C,4BAA4B;;IAE5B,8BAA8B;;kBAE9B,CAAC;AAEH;;GAEG;AACH,QAAA,MAAM,iBAAiB;;;;;kBAGrB,CAAC;AAEH;;GAEG;AACH,eAAO,MA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