feat(test-runner): add {testFileBaseName} token to snapshotPathTemplate#40466
feat(test-runner): add {testFileBaseName} token to snapshotPathTemplate#40466devareddy05 wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Test results for "tests 1"1 failed 15 flaky41463 passed, 847 skipped Merge workflow run. |
Test results for "MCP"5 failed 6803 passed, 927 skipped Merge workflow run. |
Hi maintainers @Skn0tt, I believe the Chromium failure might be flaky, it’s been passing consistently in my local setup without issues. Happy to add a changeset, rebase, or make any adjustments as needed. Thanks for taking a look! |
Summary
{testFileBaseName}token tosnapshotPathTemplate, expanding to the test file name without its last extension (matchespath.parse().name).page/page-click.spec.ts,{testFileBaseName}resolves topage-click.spec. The existing{testFileName}keeps producingpage-click.spec.ts.01-render.test.tsand a sibling snapshot folder of the same name collide; users can now write{testFileDir}/{testFileBaseName}-snapshots/{arg}{ext}to drop the trailing extension.tokens should expand propertytest insnapshot-path-template.spec.tsrather than adding a new test.Fixes #24171