@wp-tester/config 0.0.5 → 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/dist/config.d.ts +15 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +235 -14
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/options/phpunit.js +11 -11
- package/dist/options/phpunit.js.map +1 -1
- package/dist/options/project-root.d.ts.map +1 -1
- package/dist/options/project-root.js +3 -2
- package/dist/options/project-root.js.map +1 -1
- package/dist/options/project-type.js +3 -3
- package/dist/options/smoke-tests.d.ts.map +1 -1
- package/dist/options/smoke-tests.js +18 -6
- package/dist/options/smoke-tests.js.map +1 -1
- package/dist/resolved-types.d.ts +18 -4
- package/dist/resolved-types.d.ts.map +1 -1
- package/dist/schema.json +1118 -1008
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/wp-tester-config.d.ts +112 -12
- package/dist/wp-tester-config.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -108,14 +108,61 @@ export interface Tests {
|
|
|
108
108
|
/**
|
|
109
109
|
* PHPUnit test configuration.
|
|
110
110
|
* When provided, runs PHPUnit tests with the specified paths.
|
|
111
|
-
* When undefined, PHPUnit tests are
|
|
111
|
+
* When undefined, PHPUnit tests are not run.
|
|
112
112
|
*/
|
|
113
113
|
phpunit?: PHPUnitConfig;
|
|
114
|
+
/**
|
|
115
|
+
* Watch mode configuration.
|
|
116
|
+
* Controls which files are watched when using --watch flag.
|
|
117
|
+
*/
|
|
118
|
+
watch?: WatchConfig;
|
|
119
|
+
/**
|
|
120
|
+
* Allow the test suite to pass when no tests are executed.
|
|
121
|
+
* By default, wp-tester exits with code 1 when no tests are found.
|
|
122
|
+
* Set to true to exit with code 0 instead (similar to Jest's --passWithNoTests).
|
|
123
|
+
* @default false
|
|
124
|
+
*/
|
|
125
|
+
passWithNoTests?: boolean;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Base reporter options for filtering test results by status.
|
|
129
|
+
* All options default to false - only explicitly enabled statuses are shown.
|
|
130
|
+
*/
|
|
131
|
+
export interface BaseReporterOptions {
|
|
132
|
+
/**
|
|
133
|
+
* Show passed tests in output
|
|
134
|
+
* @default false
|
|
135
|
+
*/
|
|
136
|
+
passed?: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Show failed tests in output
|
|
139
|
+
* @default false
|
|
140
|
+
*/
|
|
141
|
+
failed?: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* Show skipped tests in output
|
|
144
|
+
* @default false
|
|
145
|
+
*/
|
|
146
|
+
skipped?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Show pending tests in output
|
|
149
|
+
* @default false
|
|
150
|
+
*/
|
|
151
|
+
pending?: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Show other test statuses in output
|
|
154
|
+
* @default false
|
|
155
|
+
*/
|
|
156
|
+
other?: boolean;
|
|
114
157
|
}
|
|
158
|
+
/**
|
|
159
|
+
* Default reporter configuration options
|
|
160
|
+
*/
|
|
161
|
+
export type DefaultReporterOptions = BaseReporterOptions;
|
|
115
162
|
/**
|
|
116
163
|
* JSON reporter configuration options
|
|
117
164
|
*/
|
|
118
|
-
export interface JsonReporterOptions {
|
|
165
|
+
export interface JsonReporterOptions extends BaseReporterOptions {
|
|
119
166
|
/**
|
|
120
167
|
* Path where the JSON report file should be written
|
|
121
168
|
* @example "test-results.json"
|
|
@@ -124,14 +171,24 @@ export interface JsonReporterOptions {
|
|
|
124
171
|
outputFile: string;
|
|
125
172
|
}
|
|
126
173
|
/**
|
|
127
|
-
* Reporter configuration.
|
|
128
|
-
*
|
|
129
|
-
* or a tuple of [reporter name, options] for configurable reporters.
|
|
174
|
+
* Reporter configuration object.
|
|
175
|
+
* Each key is a reporter name, and the value is its options.
|
|
130
176
|
*
|
|
131
|
-
* @example
|
|
132
|
-
* @example
|
|
177
|
+
* @example {}
|
|
178
|
+
* @example { "default": { "failed": true, "passed": true } }
|
|
179
|
+
* @example { "json": { "outputFile": "results.json", "failed": true } }
|
|
133
180
|
*/
|
|
134
|
-
export
|
|
181
|
+
export interface Reporters {
|
|
182
|
+
/**
|
|
183
|
+
* Default console reporter options.
|
|
184
|
+
* Use `true` to enable with defaults, or an object for custom options.
|
|
185
|
+
*/
|
|
186
|
+
default?: boolean | DefaultReporterOptions;
|
|
187
|
+
/**
|
|
188
|
+
* JSON file reporter options
|
|
189
|
+
*/
|
|
190
|
+
json?: JsonReporterOptions;
|
|
191
|
+
}
|
|
135
192
|
/**
|
|
136
193
|
* Environment variables for WordPress Playground.
|
|
137
194
|
* Key-value pairs of environment variable names and values.
|
|
@@ -150,11 +207,32 @@ export interface Environment {
|
|
|
150
207
|
* @example "WooCommerce Environment"
|
|
151
208
|
*/
|
|
152
209
|
name?: string;
|
|
210
|
+
/**
|
|
211
|
+
* PHP version(s) for this environment.
|
|
212
|
+
* Can be a single version string or an array of versions for matrix testing.
|
|
213
|
+
* When an array is provided, tests will run for each PHP version combined with each WP version.
|
|
214
|
+
* If blueprint.preferredVersions.php is also set, the blueprint value takes precedence
|
|
215
|
+
* and only that single version will be used.
|
|
216
|
+
* @example "8.2"
|
|
217
|
+
* @example ["8.1", "8.2", "8.3"]
|
|
218
|
+
*/
|
|
219
|
+
php?: NonNullable<BlueprintV1Declaration["preferredVersions"]>["php"][];
|
|
220
|
+
/**
|
|
221
|
+
* WordPress version(s) for this environment.
|
|
222
|
+
* Can be a single version string or an array of versions for matrix testing.
|
|
223
|
+
* When an array is provided, tests will run for each WP version combined with each PHP version.
|
|
224
|
+
* If blueprint.preferredVersions.wp is also set, the blueprint value takes precedence
|
|
225
|
+
* and only that single version will be used.
|
|
226
|
+
* @example "6.7"
|
|
227
|
+
* @example ["6.6", "6.7"]
|
|
228
|
+
*/
|
|
229
|
+
wp?: NonNullable<BlueprintV1Declaration["preferredVersions"]>["wp"][];
|
|
153
230
|
/**
|
|
154
231
|
* WordPress Playground Blueprint configuration.
|
|
155
232
|
* Can be an inline blueprint object or a file path to a blueprint JSON file.
|
|
233
|
+
* If not specified, a default blueprint will be created using the php and wp version settings.
|
|
156
234
|
*/
|
|
157
|
-
blueprint
|
|
235
|
+
blueprint?: Blueprint;
|
|
158
236
|
/**
|
|
159
237
|
* Filesystem mounts to apply to this environment
|
|
160
238
|
* @default []
|
|
@@ -166,6 +244,27 @@ export interface Environment {
|
|
|
166
244
|
* @default {}
|
|
167
245
|
*/
|
|
168
246
|
env?: EnvironmentVariables;
|
|
247
|
+
/**
|
|
248
|
+
* Whether this environment should be skipped.
|
|
249
|
+
* Skipped environments are excluded from test execution.
|
|
250
|
+
* Useful for temporarily excluding environments without removing them from configuration.
|
|
251
|
+
* @default false
|
|
252
|
+
*/
|
|
253
|
+
skip?: boolean;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Watch mode configuration for automatic test re-runs.
|
|
257
|
+
*/
|
|
258
|
+
export interface WatchConfig {
|
|
259
|
+
/**
|
|
260
|
+
* Glob patterns for files/directories to watch (relative to projectHostPath).
|
|
261
|
+
* If not specified, watches all files in the projectHostPath directory.
|
|
262
|
+
*/
|
|
263
|
+
include?: string[];
|
|
264
|
+
/**
|
|
265
|
+
* Glob patterns to exclude from watching.
|
|
266
|
+
*/
|
|
267
|
+
exclude?: string[];
|
|
169
268
|
}
|
|
170
269
|
/**
|
|
171
270
|
* Complete wp-tester configuration.
|
|
@@ -217,9 +316,10 @@ export interface WPTesterConfig {
|
|
|
217
316
|
*/
|
|
218
317
|
tests: Tests;
|
|
219
318
|
/**
|
|
220
|
-
* Output reporters for test results
|
|
221
|
-
*
|
|
319
|
+
* Output reporters for test results.
|
|
320
|
+
* Each reporter can be configured with filtering options.
|
|
321
|
+
* @default { "default": { "passed": true, "failed": true, "skipped": true, "pending": true, "other": true } }
|
|
222
322
|
*/
|
|
223
|
-
reporters?:
|
|
323
|
+
reporters?: Reporters;
|
|
224
324
|
}
|
|
225
325
|
//# sourceMappingURL=wp-tester-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wp-tester-config.d.ts","sourceRoot":"","sources":["../src/wp-tester-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,KAAK,EAAE,KAAK,IAAI,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAEjE;;;;;;;;;GASG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,aAAa,CAAC;AAG9C,YAAY,EAAE,WAAW,EAAE,CAAC;AAE5B;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,sBAAsB,GAAG,MAAM,CAAC;AAExD;;;;;;GAMG;AACH,MAAM,WAAW,KAAM,SAAQ,eAAe;IAC5C;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MA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