@@ -306,6 +306,59 @@ describe("scripts/test-projects changed-target routing", () => {
|
306 | 306 | }); |
307 | 307 | }); |
308 | 308 | |
| 309 | +it("routes nested e2e library helpers through owner tests", () => { |
| 310 | +const expectedTargets = new Map([ |
| 311 | +[ |
| 312 | +"scripts/e2e/lib/bundled-plugin-install-uninstall/probe.mjs", |
| 313 | +["test/scripts/bundled-plugin-install-uninstall-probe.test.ts"], |
| 314 | +], |
| 315 | +[ |
| 316 | +"scripts/e2e/lib/kitchen-sink-plugin/assertions.mjs", |
| 317 | +["test/scripts/kitchen-sink-plugin-assertions.test.ts"], |
| 318 | +], |
| 319 | +[ |
| 320 | +"scripts/e2e/lib/live-plugin-tool/assertions.mjs", |
| 321 | +["test/scripts/live-plugin-tool-assertions.test.ts"], |
| 322 | +], |
| 323 | +[ |
| 324 | +"scripts/e2e/lib/plugins/assertions.mjs", |
| 325 | +["test/scripts/plugins-assertions.test.ts"], |
| 326 | +], |
| 327 | +[ |
| 328 | +"scripts/e2e/lib/release-user-journey/assertions.mjs", |
| 329 | +["test/scripts/release-user-journey-assertions.test.ts"], |
| 330 | +], |
| 331 | +["scripts/e2e/lib/run-with-pty.mjs", ["test/scripts/e2e-run-with-pty.test.ts"]], |
| 332 | +]); |
| 333 | + |
| 334 | +for (const [source, targets] of expectedTargets) { |
| 335 | +expect(resolveChangedTestTargetPlan([source]), source).toEqual({ |
| 336 | +mode: "targets", |
| 337 | + targets, |
| 338 | +}); |
| 339 | +} |
| 340 | +}); |
| 341 | + |
| 342 | +it("routes nested e2e shell helpers through their sourced owner tests", () => { |
| 343 | +const expectedTargets = new Map([ |
| 344 | +[ |
| 345 | +"scripts/e2e/lib/kitchen-sink-plugin/sweep.sh", |
| 346 | +["test/scripts/kitchen-sink-plugin-assertions.test.ts"], |
| 347 | +], |
| 348 | +["scripts/e2e/lib/plugins/clawhub.sh", ["test/scripts/plugins-assertions.test.ts"]], |
| 349 | +["scripts/e2e/lib/plugins/fixtures.sh", ["test/scripts/plugins-assertions.test.ts"]], |
| 350 | +["scripts/e2e/lib/plugins/marketplace.sh", ["test/scripts/plugins-assertions.test.ts"]], |
| 351 | +["scripts/e2e/lib/plugins/sweep.sh", ["test/scripts/plugins-assertions.test.ts"]], |
| 352 | +]); |
| 353 | + |
| 354 | +for (const [source, targets] of expectedTargets) { |
| 355 | +expect(resolveChangedTestTargetPlan([source]), source).toEqual({ |
| 356 | +mode: "targets", |
| 357 | + targets, |
| 358 | +}); |
| 359 | +} |
| 360 | +}); |
| 361 | + |
309 | 362 | it("routes unmatched script changes to the tooling suite instead of skipping tests", () => { |
310 | 363 | const targets = [ |
311 | 364 | "scripts/check-no-raw-http2-imports.mjs", |
|