test(blog): add simple regression test for trailingSlash (AI-assisted)#12197
test(blog): add simple regression test for trailingSlash (AI-assisted)#1219704AvinashSingh wants to merge 1 commit into
Conversation
Fixes facebook#7656. Provides a simple string match regression check to verify trailingSlash correctly applies to blog feeds, explicitly addressing previous maintainer feedback that PR facebook#12022 was overly complex.
|
Hi @04AvinashSingh! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
✅ [V2]Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
Pre-flight checklist
Motivation
Fixes #7656.
This PR adds a simple string match regression check to the existing test suite to verify that
trailingSlash: truecorrectly applies to blog feeds.This explicitly addresses the previous maintainer feedback that PR #12022 was overly complex, achieving the exact same regression coverage in just 4 lines of code without requiring dynamic XML/JSON parsing.
(AI-assisted)
Test Plan
Ran
pnpm testover the entire repository. The new assertion inpackages/docusaurus-plugin-content-blog/src/__tests__/feed.test.tsfails loudly ifapplyTrailingSlashis ever accidentally removed from the feed generator logic, but passes cleanly with the current correct behavior.Additionally, I fixed two hidden TypeScript compilation errors inside
feed.test.ts(a brokenDEFAULT_VCS_CONFIGimport and an outdatedI18nLocaleConfigmock) that were incorrectly being skipped by__tests__exclusions in the TS config.Test links
N/A - Unit test change only.
Related issues/PRs
Fixes #7656
Supersedes #12022